mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
fix numerous typos+misspellings
This commit is contained in:
parent
b142a47109
commit
b9bb56841d
@ -182,7 +182,7 @@ class Authorize(object):
|
|||||||
|
|
||||||
def auth_data(self):
|
def auth_data(self):
|
||||||
'''
|
'''
|
||||||
Gather and create the autorization data sets
|
Gather and create the authorization data sets
|
||||||
'''
|
'''
|
||||||
auth_data = self.opts['external_auth']
|
auth_data = self.opts['external_auth']
|
||||||
#for auth_back in self.opts.get('external_auth_sources', []):
|
#for auth_back in self.opts.get('external_auth_sources', []):
|
||||||
|
@ -153,7 +153,7 @@ class Shell(object):
|
|||||||
'''
|
'''
|
||||||
if self.passwd:
|
if self.passwd:
|
||||||
# Using single quotes prevents shell expansion and
|
# Using single quotes prevents shell expansion and
|
||||||
# passwords containig '$'
|
# passwords containing '$'
|
||||||
return "{0} {1} '{2} -p {3} {4}@{5}'".format(
|
return "{0} {1} '{2} -p {3} {4}@{5}'".format(
|
||||||
'ssh-copy-id',
|
'ssh-copy-id',
|
||||||
'-i {0}.pub'.format(self.priv),
|
'-i {0}.pub'.format(self.priv),
|
||||||
@ -170,7 +170,7 @@ class Shell(object):
|
|||||||
'''
|
'''
|
||||||
if self.passwd:
|
if self.passwd:
|
||||||
# Using single quotes prevents shell expansion and
|
# Using single quotes prevents shell expansion and
|
||||||
# passwords containig '$'
|
# passwords containing '$'
|
||||||
return "{0} {1} {2} -p {3} {4}@{5}".format(
|
return "{0} {1} {2} -p {3} {4}@{5}".format(
|
||||||
'ssh-copy-id',
|
'ssh-copy-id',
|
||||||
'-i {0}.pub'.format(self.priv),
|
'-i {0}.pub'.format(self.priv),
|
||||||
|
@ -445,7 +445,7 @@ def _wait_for_spot_instance(update_callback,
|
|||||||
:param update_kwargs: Keyword arguments to pass to update_callback
|
:param update_kwargs: Keyword arguments to pass to update_callback
|
||||||
:param timeout: The maximum amount of time(in seconds) to wait for the IP
|
:param timeout: The maximum amount of time(in seconds) to wait for the IP
|
||||||
address.
|
address.
|
||||||
:param interval: The looping interval, ie, the amount of time to sleep
|
:param interval: The looping interval, i.e., the amount of time to sleep
|
||||||
before the next iteration.
|
before the next iteration.
|
||||||
:param interval_multiplier: Increase the interval by this multiplier after
|
:param interval_multiplier: Increase the interval by this multiplier after
|
||||||
each request; helps with throttling
|
each request; helps with throttling
|
||||||
|
@ -639,7 +639,7 @@ def avail_locations(call=None):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# this can be enabled when the bug in the joyent get data centers call is
|
# this can be enabled when the bug in the joyent get data centers call is
|
||||||
# corrected, currently only the european dc (new api) returns the correct
|
# corrected, currently only the European dc (new api) returns the correct
|
||||||
# values
|
# values
|
||||||
# ret = {}
|
# ret = {}
|
||||||
# rcode, datacenters = query(
|
# rcode, datacenters = query(
|
||||||
|
@ -71,7 +71,7 @@ def check_libcloud_version(reqver=LIBCLOUD_MINIMAL_VERSION, why=None):
|
|||||||
|
|
||||||
if not isinstance(reqver, (list, tuple)):
|
if not isinstance(reqver, (list, tuple)):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
'\'reqver\' needs to passed as a tuple or list, ie, (0, 14, 0)'
|
'\'reqver\' needs to passed as a tuple or list, i.e., (0, 14, 0)'
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
import libcloud # pylint: disable=redefined-outer-name
|
import libcloud # pylint: disable=redefined-outer-name
|
||||||
|
@ -773,7 +773,7 @@ def load_config(path, env_var, default_path=None):
|
|||||||
return {}
|
return {}
|
||||||
|
|
||||||
if default_path is None:
|
if default_path is None:
|
||||||
# This is most likely not being used from salt, ie, could be salt-cloud
|
# This is most likely not being used from salt, i.e., could be salt-cloud
|
||||||
# or salt-api which have not yet migrated to the new default_path
|
# or salt-api which have not yet migrated to the new default_path
|
||||||
# argument. Let's issue a warning message that the environ vars won't
|
# argument. Let's issue a warning message that the environ vars won't
|
||||||
# work.
|
# work.
|
||||||
|
@ -937,7 +937,7 @@ class RemoteClient(Client):
|
|||||||
saltenv = env
|
saltenv = env
|
||||||
|
|
||||||
# Hash compare local copy with master and skip download
|
# Hash compare local copy with master and skip download
|
||||||
# if no diference found.
|
# if no difference found.
|
||||||
dest2check = dest
|
dest2check = dest
|
||||||
if not dest2check:
|
if not dest2check:
|
||||||
rel_path = self._check_proto(path)
|
rel_path = self._check_proto(path)
|
||||||
|
@ -158,7 +158,7 @@ class KeyCLI(object):
|
|||||||
'''
|
'''
|
||||||
Accept all keys
|
Accept all keys
|
||||||
|
|
||||||
:param bool include_rejected: Whether or not to accept a matched key that was formely rejected
|
:param bool include_rejected: Whether or not to accept a matched key that was formerly rejected
|
||||||
'''
|
'''
|
||||||
self.accept('*', include_rejected=include_rejected)
|
self.accept('*', include_rejected=include_rejected)
|
||||||
|
|
||||||
|
@ -943,7 +943,7 @@ class Loader(object):
|
|||||||
isinstance(getattr(mod, sname), mod.__class__)
|
isinstance(getattr(mod, sname), mod.__class__)
|
||||||
]
|
]
|
||||||
|
|
||||||
# reload only custom "sub"modules i.e is a submodule in
|
# reload only custom "sub"modules i.e. is a submodule in
|
||||||
# parent module that are still available on disk (i.e. not
|
# parent module that are still available on disk (i.e. not
|
||||||
# removed during sync_modules)
|
# removed during sync_modules)
|
||||||
for submodule in submodules:
|
for submodule in submodules:
|
||||||
@ -1048,7 +1048,7 @@ class Loader(object):
|
|||||||
Given a loaded module and its default name determine its virtual name
|
Given a loaded module and its default name determine its virtual name
|
||||||
|
|
||||||
This function returns a tuple. The first value will be either True or
|
This function returns a tuple. The first value will be either True or
|
||||||
False and will indicate if the module should be loaded or not (ie. if
|
False and will indicate if the module should be loaded or not (i.e. if
|
||||||
it threw and exception while processing its __virtual__ function). The
|
it threw and exception while processing its __virtual__ function). The
|
||||||
second value is the determined virtual name, which may be the same as
|
second value is the determined virtual name, which may be the same as
|
||||||
the value provided.
|
the value provided.
|
||||||
|
@ -103,7 +103,7 @@ class SaltLoggingClass(LOGGING_LOGGER_CLASS, NewStyleClassMixIn):
|
|||||||
is being used, and also some Unicode fixes.
|
is being used, and also some Unicode fixes.
|
||||||
|
|
||||||
This code overhead will only be executed when the class is
|
This code overhead will only be executed when the class is
|
||||||
instantiated, ie:
|
instantiated, i.e.:
|
||||||
|
|
||||||
logging.getLogger(__name__)
|
logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class SMaster(object):
|
|||||||
|
|
||||||
class Maintenance(multiprocessing.Process):
|
class Maintenance(multiprocessing.Process):
|
||||||
'''
|
'''
|
||||||
A generalized maintenence process which performances maintenence
|
A generalized maintenance process which performances maintenance
|
||||||
routines.
|
routines.
|
||||||
'''
|
'''
|
||||||
def __init__(self, opts):
|
def __init__(self, opts):
|
||||||
|
@ -117,7 +117,7 @@ def execute(context=None, lens=None, commands=()):
|
|||||||
aug.load()
|
aug.load()
|
||||||
|
|
||||||
for command in commands:
|
for command in commands:
|
||||||
# first part up to space is always the command name (ie: set, move)
|
# first part up to space is always the command name (i.e.: set, move)
|
||||||
cmd, arg = command.split(' ', 1)
|
cmd, arg = command.split(' ', 1)
|
||||||
if cmd not in method_map:
|
if cmd not in method_map:
|
||||||
ret['error'] = 'Command {0} is not supported (yet)'.format(cmd)
|
ret['error'] = 'Command {0} is not supported (yet)'.format(cmd)
|
||||||
|
@ -356,7 +356,7 @@ def detach_subnets(name, subnets, region=None, key=None, keyid=None,
|
|||||||
subnets = json.loads(subnets)
|
subnets = json.loads(subnets)
|
||||||
try:
|
try:
|
||||||
conn.detach_lb_from_subnets(name, subnets)
|
conn.detach_lb_from_subnets(name, subnets)
|
||||||
msg = 'Detatched ELB {0} from subnets.'.format(name)
|
msg = 'Detached ELB {0} from subnets.'.format(name)
|
||||||
log.info(msg)
|
log.info(msg)
|
||||||
return True
|
return True
|
||||||
except boto.exception.BotoServerError as e:
|
except boto.exception.BotoServerError as e:
|
||||||
|
@ -445,7 +445,7 @@ def _run(cmd,
|
|||||||
# cases
|
# cases
|
||||||
ret['stdout'] = stdout
|
ret['stdout'] = stdout
|
||||||
if not proc.isalive():
|
if not proc.isalive():
|
||||||
# Process terminated, ie, not canceled by the user or by
|
# Process terminated, i.e., not canceled by the user or by
|
||||||
# the timeout
|
# the timeout
|
||||||
ret['stderr'] = stderr
|
ret['stderr'] = stderr
|
||||||
ret['retcode'] = proc.exitstatus
|
ret['retcode'] = proc.exitstatus
|
||||||
|
@ -141,7 +141,7 @@ def search_keys(text, keyserver=None, user=None):
|
|||||||
Search keys from keyserver
|
Search keys from keyserver
|
||||||
|
|
||||||
text
|
text
|
||||||
Text to search the keyserver for, eg. email address, keyID or fingerprint.
|
Text to search the keyserver for, e.g. email address, keyID or fingerprint.
|
||||||
|
|
||||||
keyserver
|
keyserver
|
||||||
Keyserver to use for searching for GPG keys, defaults to pgp.mit.edu
|
Keyserver to use for searching for GPG keys, defaults to pgp.mit.edu
|
||||||
@ -287,7 +287,7 @@ def create_key(key_type='RSA',
|
|||||||
package.
|
package.
|
||||||
|
|
||||||
The create_key process takes awhile so increasing the timeout
|
The create_key process takes awhile so increasing the timeout
|
||||||
may be necessary, eg. -t 15.
|
may be necessary, e.g. -t 15.
|
||||||
|
|
||||||
key_type
|
key_type
|
||||||
The type of the primary key to generate. It must be capable of signing.
|
The type of the primary key to generate. It must be capable of signing.
|
||||||
|
@ -125,7 +125,7 @@ def cloud_init_interface(name, vm_=None, **kwargs):
|
|||||||
This is a list of mappings ``{ip: '', mac: '',netmask:''}``
|
This is a list of mappings ``{ip: '', mac: '',netmask:''}``
|
||||||
Set gateway to ``None`` and an interface with a gateway
|
Set gateway to ``None`` and an interface with a gateway
|
||||||
to escape from another interface that's eth0.
|
to escape from another interface that's eth0.
|
||||||
eg:
|
e.g.:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ def init(name,
|
|||||||
This can be either a real profile mapping or a string
|
This can be either a real profile mapping or a string
|
||||||
to retrieve it in configuration
|
to retrieve it in configuration
|
||||||
nic_opts
|
nic_opts
|
||||||
Extra options for network interfaces. E.g:
|
Extra options for network interfaces. E.g.:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ def _porttree():
|
|||||||
def _p_to_cp(p):
|
def _p_to_cp(p):
|
||||||
'''
|
'''
|
||||||
Convert a package name or a DEPEND atom to category/package format.
|
Convert a package name or a DEPEND atom to category/package format.
|
||||||
Raises an exception if program name is ambigous.
|
Raises an exception if program name is ambiguous.
|
||||||
'''
|
'''
|
||||||
ret = _porttree().dbapi.xmatch("match-all", p)
|
ret = _porttree().dbapi.xmatch("match-all", p)
|
||||||
if ret:
|
if ret:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
'''
|
'''
|
||||||
Module for manging the Salt schedule on a minion
|
Module for managing the Salt schedule on a minion
|
||||||
|
|
||||||
.. versionadded:: 2014.7.0
|
.. versionadded:: 2014.7.0
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ def _ips_get_pkgname(line):
|
|||||||
'''
|
'''
|
||||||
Extracts package name from "pkg list -v" output.
|
Extracts package name from "pkg list -v" output.
|
||||||
Input: one line of the command output
|
Input: one line of the command output
|
||||||
Output: pkg name (e.g: "pkg://solaris/x11/library/toolkit/libxt")
|
Output: pkg name (e.g.: "pkg://solaris/x11/library/toolkit/libxt")
|
||||||
Example use:
|
Example use:
|
||||||
line = "pkg://solaris/x11/library/toolkit/libxt@1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z i--"
|
line = "pkg://solaris/x11/library/toolkit/libxt@1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z i--"
|
||||||
name = _ips_get_pkgname(line)
|
name = _ips_get_pkgname(line)
|
||||||
@ -64,7 +64,7 @@ def _ips_get_pkgversion(line):
|
|||||||
'''
|
'''
|
||||||
Extracts package version from "pkg list -v" output.
|
Extracts package version from "pkg list -v" output.
|
||||||
Input: one line of the command output
|
Input: one line of the command output
|
||||||
Output: package version (e.g: "1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z")
|
Output: package version (e.g.: "1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z")
|
||||||
Example use:
|
Example use:
|
||||||
line = "pkg://solaris/x11/library/toolkit/libxt@1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z i--"
|
line = "pkg://solaris/x11/library/toolkit/libxt@1.1.3,5.11-0.175.1.0.0.24.1317:20120904T180030Z i--"
|
||||||
name = _ips_get_pkgversion(line)
|
name = _ips_get_pkgversion(line)
|
||||||
@ -411,7 +411,7 @@ def install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwa
|
|||||||
output['message'] = ret['stderr'] + '\n'
|
output['message'] = ret['stderr'] + '\n'
|
||||||
return output
|
return output
|
||||||
|
|
||||||
# No error occured
|
# No error occurred
|
||||||
if test:
|
if test:
|
||||||
return "Test succeeded."
|
return "Test succeeded."
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ def remove(name=None, pkgs=None, **kwargs):
|
|||||||
output['message'] = ret['stderr'] + '\n'
|
output['message'] = ret['stderr'] + '\n'
|
||||||
return output
|
return output
|
||||||
|
|
||||||
# No error occured
|
# No error occurred
|
||||||
return changes
|
return changes
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ if _check_zfs():
|
|||||||
for available_cmd in available_cmds:
|
for available_cmd in available_cmds:
|
||||||
|
|
||||||
# Set the output from _make_function to be 'available_cmd_'.
|
# Set the output from _make_function to be 'available_cmd_'.
|
||||||
# ie 'list' becomes 'list_' in local module.
|
# i.e. 'list' becomes 'list_' in local module.
|
||||||
setattr(
|
setattr(
|
||||||
sys.modules[__name__],
|
sys.modules[__name__],
|
||||||
'{0}_'.format(available_cmd),
|
'{0}_'.format(available_cmd),
|
||||||
|
@ -279,7 +279,7 @@ Once an :ref:`ID-declaration` is called at render time it is detached from the
|
|||||||
sls module as if it was never defined.
|
sls module as if it was never defined.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If `implicit ordering` is enabled (ie, via ``__pydsl__.set(ordered=True)``) then
|
If `implicit ordering` is enabled (i.e., via ``__pydsl__.set(ordered=True)``) then
|
||||||
the *first* invocation of a :ref:`ID-declaration` object must be done before a
|
the *first* invocation of a :ref:`ID-declaration` object must be done before a
|
||||||
new :ref:`function-declaration` is created.
|
new :ref:`function-declaration` is created.
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ Creating state data
|
|||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
Pyobjects takes care of creating an object for each of the available states on
|
Pyobjects takes care of creating an object for each of the available states on
|
||||||
the minion. Each state is represented by an object that is the CamelCase
|
the minion. Each state is represented by an object that is the CamelCase
|
||||||
version of its name (ie. ``File``, ``Service``, ``User``, etc), and these
|
version of its name (i.e. ``File``, ``Service``, ``User``, etc), and these
|
||||||
objects expose all of their available state functions (ie. ``File.managed``,
|
objects expose all of their available state functions (i.e. ``File.managed``,
|
||||||
``Service.running``, etc).
|
``Service.running``, etc).
|
||||||
|
|
||||||
The name of the state is split based upon underscores (``_``), then each part
|
The name of the state is split based upon underscores (``_``), then each part
|
||||||
|
@ -12,7 +12,7 @@ A flexible renderer that takes a templating engine and a data format
|
|||||||
# FIXME: I really need to review and simplify this renderer, it's getting out of hand!
|
# FIXME: I really need to review and simplify this renderer, it's getting out of hand!
|
||||||
#
|
#
|
||||||
# TODO:
|
# TODO:
|
||||||
# - sls meta/info state: Eg,
|
# - sls meta/info state: E.g.,
|
||||||
#
|
#
|
||||||
# sls_info:
|
# sls_info:
|
||||||
# stateconf.set:
|
# stateconf.set:
|
||||||
@ -20,7 +20,7 @@ A flexible renderer that takes a templating engine and a data format
|
|||||||
# - description: what the salt file does...
|
# - description: what the salt file does...
|
||||||
# - version: 0.1.0
|
# - version: 0.1.0
|
||||||
#
|
#
|
||||||
# - version constraint for 'include'. Eg,
|
# - version constraint for 'include'. E.g.,
|
||||||
#
|
#
|
||||||
# include:
|
# include:
|
||||||
# - apache: >= 0.1.0
|
# - apache: >= 0.1.0
|
||||||
@ -453,7 +453,7 @@ def add_implicit_requires(data):
|
|||||||
if prev_state[0] is not None:
|
if prev_state[0] is not None:
|
||||||
try:
|
try:
|
||||||
nvlist(args, ['require']).next()[2].insert(0, dict([prev_state]))
|
nvlist(args, ['require']).next()[2].insert(0, dict([prev_state]))
|
||||||
except StopIteration: # ie, there's no require
|
except StopIteration: # i.e., there's no require
|
||||||
args.append(dict(require=[dict([prev_state])]))
|
args.append(dict(require=[dict([prev_state])]))
|
||||||
|
|
||||||
states_before.add(tag)
|
states_before.add(tag)
|
||||||
|
@ -163,7 +163,7 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
|
|||||||
A LXC profile (defined in config or pillar).
|
A LXC profile (defined in config or pillar).
|
||||||
|
|
||||||
nic_opts
|
nic_opts
|
||||||
Extra options for network interfaces. E.g:
|
Extra options for network interfaces. E.g.:
|
||||||
|
|
||||||
``{"eth0": {"mac": "aa:bb:cc:dd:ee:ff", "ipv4": "10.1.1.1", "ipv6": "2001:db8::ff00:42:8329"}}``
|
``{"eth0": {"mac": "aa:bb:cc:dd:ee:ff", "ipv4": "10.1.1.1", "ipv6": "2001:db8::ff00:42:8329"}}``
|
||||||
|
|
||||||
|
@ -1537,8 +1537,8 @@ class State(object):
|
|||||||
except Exception:
|
except Exception:
|
||||||
trb = traceback.format_exc()
|
trb = traceback.format_exc()
|
||||||
# There are a number of possibilities to not have the cdata
|
# There are a number of possibilities to not have the cdata
|
||||||
# populated with what we might have expected, so just be enought
|
# populated with what we might have expected, so just be smart
|
||||||
# smart to not raise another KeyError as the name is easily
|
# enough to not raise another KeyError as the name is easily
|
||||||
# guessable and fallback in all cases to present the real
|
# guessable and fallback in all cases to present the real
|
||||||
# exception to the user
|
# exception to the user
|
||||||
if len(cdata['args']) > 0:
|
if len(cdata['args']) > 0:
|
||||||
|
@ -95,7 +95,7 @@ def present(name, cloud_provider, onlyif=None, unless=None, **kwargs):
|
|||||||
return _valid(name, comment='unless execution succeeded')
|
return _valid(name, comment='unless execution succeeded')
|
||||||
|
|
||||||
# provider=None not cloud_provider because
|
# provider=None not cloud_provider because
|
||||||
# need to ensure ALL providers dont have the instance
|
# need to ensure ALL providers don't have the instance
|
||||||
if __salt__['cloud.has_instance'](name=name, provider=None):
|
if __salt__['cloud.has_instance'](name=name, provider=None):
|
||||||
ret['result'] = True
|
ret['result'] = True
|
||||||
ret['comment'] = 'Already present instance {0}'.format(name)
|
ret['comment'] = 'Already present instance {0}'.format(name)
|
||||||
|
@ -379,7 +379,7 @@ def _get_recurse_dest(prefix, fn_, source, env):
|
|||||||
|
|
||||||
srcpath = source[7:] # the path after "salt://"
|
srcpath = source[7:] # the path after "salt://"
|
||||||
|
|
||||||
# in solo mode(ie, file_client=='local'), fn_ is a path below
|
# in solo mode (i.e., file_client=='local'), fn_ is a path below
|
||||||
# a file root; in remote mode, fn_ is a path below the cache_dir.
|
# a file root; in remote mode, fn_ is a path below the cache_dir.
|
||||||
for root in local_roots:
|
for root in local_roots:
|
||||||
rootlen = len(root)
|
rootlen = len(root)
|
||||||
|
@ -132,7 +132,7 @@ def mounted(name,
|
|||||||
|
|
||||||
# When included in a Salt state file, FUSE
|
# When included in a Salt state file, FUSE
|
||||||
# devices are prefaced by the filesystem type
|
# devices are prefaced by the filesystem type
|
||||||
# and a hash, eg. sshfs#. In the mount list
|
# and a hash, e.g. sshfs#. In the mount list
|
||||||
# only the hostname is included. So if we detect
|
# only the hostname is included. So if we detect
|
||||||
# that the device is a FUSE device then we
|
# that the device is a FUSE device then we
|
||||||
# remove the prefaced string so that the device in
|
# remove the prefaced string so that the device in
|
||||||
|
@ -82,7 +82,7 @@ def present(name,
|
|||||||
The grant priv_type (i.e. select,insert,update OR all privileges)
|
The grant priv_type (i.e. select,insert,update OR all privileges)
|
||||||
|
|
||||||
database
|
database
|
||||||
The database priv_level (ie. db.tbl OR db.*)
|
The database priv_level (i.e. db.tbl OR db.*)
|
||||||
|
|
||||||
user
|
user
|
||||||
The user to apply the grant to
|
The user to apply the grant to
|
||||||
|
@ -148,8 +148,8 @@ def template_shebang(template, renderers, default):
|
|||||||
return render_pipe
|
return render_pipe
|
||||||
|
|
||||||
|
|
||||||
# A dict of combined renderer(ie, rend1_rend2_...) to
|
# A dict of combined renderer (i.e., rend1_rend2_...) to
|
||||||
# render-pipe(ie, rend1|rend2|...)
|
# render-pipe (i.e., rend1|rend2|...)
|
||||||
#
|
#
|
||||||
OLD_STYLE_RENDERERS = {}
|
OLD_STYLE_RENDERERS = {}
|
||||||
|
|
||||||
|
@ -2260,7 +2260,7 @@ def get_group_dict(user=None, include_default=True):
|
|||||||
'''
|
'''
|
||||||
Returns a dict of all of the system groups as keys, and group ids
|
Returns a dict of all of the system groups as keys, and group ids
|
||||||
as values, of which the user is a member.
|
as values, of which the user is a member.
|
||||||
E.g: {'staff': 501, 'sudo': 27}
|
E.g.: {'staff': 501, 'sudo': 27}
|
||||||
'''
|
'''
|
||||||
if HAS_GRP is False or HAS_PWD is False:
|
if HAS_GRP is False or HAS_PWD is False:
|
||||||
# We don't work on platforms that don't have grp and pwd
|
# We don't work on platforms that don't have grp and pwd
|
||||||
|
@ -586,7 +586,7 @@ def wait_for_port(host, port=22, timeout=900, gateway=None):
|
|||||||
ssh_args.extend([
|
ssh_args.extend([
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none'
|
'-oControlPath=none'
|
||||||
@ -1441,7 +1441,7 @@ def scp_file(dest_path, contents, kwargs):
|
|||||||
ssh_args = [
|
ssh_args = [
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none'
|
'-oControlPath=none'
|
||||||
@ -1482,7 +1482,7 @@ def scp_file(dest_path, contents, kwargs):
|
|||||||
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none',
|
'-oControlPath=none',
|
||||||
@ -1559,7 +1559,7 @@ def sftp_file(dest_path, contents=None, kwargs=None, local_file=None):
|
|||||||
ssh_args = [
|
ssh_args = [
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none'
|
'-oControlPath=none'
|
||||||
@ -1600,7 +1600,7 @@ def sftp_file(dest_path, contents=None, kwargs=None, local_file=None):
|
|||||||
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none',
|
'-oControlPath=none',
|
||||||
@ -1682,7 +1682,7 @@ def root_cmd(command, tty, sudo, allow_failure=False, **kwargs):
|
|||||||
ssh_args.extend([
|
ssh_args.extend([
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking={0}'.format(host_key_checking),
|
'-oStrictHostKeyChecking={0}'.format(host_key_checking),
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile={0}'.format(known_hosts_file),
|
'-oUserKnownHostsFile={0}'.format(known_hosts_file),
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none'
|
'-oControlPath=none'
|
||||||
@ -1721,7 +1721,7 @@ def root_cmd(command, tty, sudo, allow_failure=False, **kwargs):
|
|||||||
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none',
|
'-oControlPath=none',
|
||||||
@ -1861,7 +1861,7 @@ def wait_for_ip(update_callback,
|
|||||||
:param update_kwargs: Keyword arguments to pass to update_callback
|
:param update_kwargs: Keyword arguments to pass to update_callback
|
||||||
:param timeout: The maximum amount of time(in seconds) to wait for the IP
|
:param timeout: The maximum amount of time(in seconds) to wait for the IP
|
||||||
address.
|
address.
|
||||||
:param interval: The looping interval, ie, the amount of time to sleep
|
:param interval: The looping interval, i.e., the amount of time to sleep
|
||||||
before the next iteration.
|
before the next iteration.
|
||||||
:param interval_multiplier: Increase the interval by this multiplier after
|
:param interval_multiplier: Increase the interval by this multiplier after
|
||||||
each request; helps with throttling
|
each request; helps with throttling
|
||||||
@ -1920,7 +1920,7 @@ def wait_for_ip(update_callback,
|
|||||||
|
|
||||||
def simple_types_filter(data):
|
def simple_types_filter(data):
|
||||||
'''
|
'''
|
||||||
Convert the data list, dictionary into simple types, ie, int, float, string,
|
Convert the data list, dictionary into simple types, i.e., int, float, string,
|
||||||
bool, etc.
|
bool, etc.
|
||||||
'''
|
'''
|
||||||
if data is None:
|
if data is None:
|
||||||
|
@ -78,8 +78,8 @@ def enable_sigusr1_handler():
|
|||||||
when any of the salt daemons such as salt-master are sent a SIGUSR1
|
when any of the salt daemons such as salt-master are sent a SIGUSR1
|
||||||
'''
|
'''
|
||||||
enable_sig_handler('SIGUSR1', _handle_sigusr1)
|
enable_sig_handler('SIGUSR1', _handle_sigusr1)
|
||||||
# Also canonical BSD-way of printing profress is SIGINFO
|
# Also canonical BSD-way of printing progress is SIGINFO
|
||||||
# which on BSD-deriviatives can be sent via Ctrl+T
|
# which on BSD-derivatives can be sent via Ctrl+T
|
||||||
enable_sig_handler('SIGINFO', _handle_sigusr1)
|
enable_sig_handler('SIGINFO', _handle_sigusr1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ def identical_signature_wrapper(original_function, wrapped_function):
|
|||||||
' return __wrapped__({2})'.format(
|
' return __wrapped__({2})'.format(
|
||||||
# Keep the original function name
|
# Keep the original function name
|
||||||
original_function.__name__,
|
original_function.__name__,
|
||||||
# The function signature including defaults, ie, 'timeout=1'
|
# The function signature including defaults, i.e., 'timeout=1'
|
||||||
inspect.formatargspec(
|
inspect.formatargspec(
|
||||||
*inspect.getargspec(original_function)
|
*inspect.getargspec(original_function)
|
||||||
)[1:-1],
|
)[1:-1],
|
||||||
|
@ -555,7 +555,7 @@ class ConnectedCache(multiprocessing.Process):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
self.stop()
|
self.stop()
|
||||||
except zmq.ZMQError as zmq_err:
|
except zmq.ZMQError as zmq_err:
|
||||||
log.error('ConCache ZeroMQ-Error occured')
|
log.error('ConCache ZeroMQ-Error occurred')
|
||||||
log.exception(zmq_err)
|
log.exception(zmq_err)
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ class CkMinions(object):
|
|||||||
'''
|
'''
|
||||||
if not HAS_RANGE:
|
if not HAS_RANGE:
|
||||||
raise CommandExecutionError(
|
raise CommandExecutionError(
|
||||||
'Range matcher unavailble (unable to import seco.range, '
|
'Range matcher unavailable (unable to import seco.range, '
|
||||||
'module most likely not installed)'
|
'module most likely not installed)'
|
||||||
)
|
)
|
||||||
cache_enabled = self.opts.get('minion_data_cache', False)
|
cache_enabled = self.opts.get('minion_data_cache', False)
|
||||||
|
@ -514,7 +514,7 @@ class LogLevelMixIn(object):
|
|||||||
)
|
)
|
||||||
if self.config.get(cli_setting_name, None) is not None:
|
if self.config.get(cli_setting_name, None) is not None:
|
||||||
# There's a configuration setting defining this log file path,
|
# There's a configuration setting defining this log file path,
|
||||||
# ie, `key_log_file` if the cli tool is `salt-key`
|
# i.e., `key_log_file` if the cli tool is `salt-key`
|
||||||
self.options.log_file = self.config.get(cli_setting_name)
|
self.options.log_file = self.config.get(cli_setting_name)
|
||||||
elif self.config.get(self._logfile_config_setting_name_, None):
|
elif self.config.get(self._logfile_config_setting_name_, None):
|
||||||
# Is the regular log file setting set?
|
# Is the regular log file setting set?
|
||||||
@ -533,7 +533,7 @@ class LogLevelMixIn(object):
|
|||||||
)
|
)
|
||||||
if self.config.get(cli_setting_name, None) is not None:
|
if self.config.get(cli_setting_name, None) is not None:
|
||||||
# There's a configuration setting defining this log file
|
# There's a configuration setting defining this log file
|
||||||
# logging level, ie, `key_log_file_level` if the cli tool is
|
# logging level, i.e., `key_log_file_level` if the cli tool is
|
||||||
# `salt-key`
|
# `salt-key`
|
||||||
self.options.log_file_level = self.config.get(cli_setting_name)
|
self.options.log_file_level = self.config.get(cli_setting_name)
|
||||||
elif self.config.get(
|
elif self.config.get(
|
||||||
|
@ -198,7 +198,7 @@ class State(object):
|
|||||||
This represents a single item in the state tree
|
This represents a single item in the state tree
|
||||||
|
|
||||||
The id_ is the id of the state, the func is the full name of the salt
|
The id_ is the id of the state, the func is the full name of the salt
|
||||||
state (ie. file.managed). All the keyword args you pass in become the
|
state (i.e. file.managed). All the keyword args you pass in become the
|
||||||
properties of your state.
|
properties of your state.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
|
|||||||
|
|
||||||
if not saltenv:
|
if not saltenv:
|
||||||
if tmplpath:
|
if tmplpath:
|
||||||
# ie, the template is from a file outside the state tree
|
# i.e., the template is from a file outside the state tree
|
||||||
#
|
#
|
||||||
# XXX: FileSystemLoader is not being properly instantiated here is
|
# XXX: FileSystemLoader is not being properly instantiated here is
|
||||||
# it? At least it ain't according to:
|
# it? At least it ain't according to:
|
||||||
@ -344,7 +344,7 @@ def render_mako_tmpl(tmplstr, context, tmplpath=None):
|
|||||||
lookup = None
|
lookup = None
|
||||||
if not saltenv:
|
if not saltenv:
|
||||||
if tmplpath:
|
if tmplpath:
|
||||||
# ie, the template is from a file outside the state tree
|
# i.e., the template is from a file outside the state tree
|
||||||
from mako.lookup import TemplateLookup
|
from mako.lookup import TemplateLookup
|
||||||
lookup = TemplateLookup(directories=[os.path.dirname(tmplpath)])
|
lookup = TemplateLookup(directories=[os.path.dirname(tmplpath)])
|
||||||
else:
|
else:
|
||||||
|
@ -19,7 +19,7 @@ except ImportError:
|
|||||||
|
|
||||||
# ----- ATTENTION --------------------------------------------------------------------------------------------------->
|
# ----- ATTENTION --------------------------------------------------------------------------------------------------->
|
||||||
#
|
#
|
||||||
# ALL major version bumps, new release codenames, MUST be defined in the SaltStackVersion.NAMES dictionary, ie:
|
# ALL major version bumps, new release codenames, MUST be defined in the SaltStackVersion.NAMES dictionary, i.e.:
|
||||||
#
|
#
|
||||||
# class SaltStackVersion(object):
|
# class SaltStackVersion(object):
|
||||||
#
|
#
|
||||||
|
@ -592,7 +592,7 @@ def build_scp_command(options, *arguments):
|
|||||||
os.path.join(options.workspace, 'jenkins_ssh_key_test'),
|
os.path.join(options.workspace, 'jenkins_ssh_key_test'),
|
||||||
# Don't add new hosts to the host key database
|
# Don't add new hosts to the host key database
|
||||||
'-oStrictHostKeyChecking=no',
|
'-oStrictHostKeyChecking=no',
|
||||||
# Set hosts key database path to /dev/null, ie, non-existing
|
# Set hosts key database path to /dev/null, i.e., non-existing
|
||||||
'-oUserKnownHostsFile=/dev/null',
|
'-oUserKnownHostsFile=/dev/null',
|
||||||
# Don't re-use the SSH connection. Less failures.
|
# Don't re-use the SSH connection. Less failures.
|
||||||
'-oControlPath=none',
|
'-oControlPath=none',
|
||||||
|
@ -159,7 +159,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
|
|||||||
'log_file: {1}\n'.format(root_dir, fpath)
|
'log_file: {1}\n'.format(root_dir, fpath)
|
||||||
)
|
)
|
||||||
# Let's set the environment variable, yet, since the configuration
|
# Let's set the environment variable, yet, since the configuration
|
||||||
# file path is not the default one, ie, the user has passed an
|
# file path is not the default one, i.e., the user has passed an
|
||||||
# alternative configuration file form the CLI parser, the
|
# alternative configuration file form the CLI parser, the
|
||||||
# environment variable will be ignored.
|
# environment variable will be ignored.
|
||||||
os.environ['SALT_MASTER_CONFIG'] = env_fpath
|
os.environ['SALT_MASTER_CONFIG'] = env_fpath
|
||||||
@ -201,7 +201,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
|
|||||||
'log_file: {1}\n'.format(root_dir, fpath)
|
'log_file: {1}\n'.format(root_dir, fpath)
|
||||||
)
|
)
|
||||||
# Let's set the environment variable, yet, since the configuration
|
# Let's set the environment variable, yet, since the configuration
|
||||||
# file path is not the default one, ie, the user has passed an
|
# file path is not the default one, i.e., the user has passed an
|
||||||
# alternative configuration file form the CLI parser, the
|
# alternative configuration file form the CLI parser, the
|
||||||
# environment variable will be ignored.
|
# environment variable will be ignored.
|
||||||
os.environ['SALT_MINION_CONFIG'] = env_fpath
|
os.environ['SALT_MINION_CONFIG'] = env_fpath
|
||||||
@ -255,7 +255,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
|
|||||||
'log_file: {1}\n'.format(root_dir, fpath)
|
'log_file: {1}\n'.format(root_dir, fpath)
|
||||||
)
|
)
|
||||||
# Let's set the environment variable, yet, since the configuration
|
# Let's set the environment variable, yet, since the configuration
|
||||||
# file path is not the default one, ie, the user has passed an
|
# file path is not the default one, i.e., the user has passed an
|
||||||
# alternative configuration file form the CLI parser, the
|
# alternative configuration file form the CLI parser, the
|
||||||
# environment variable will be ignored.
|
# environment variable will be ignored.
|
||||||
os.environ['SALT_MASTER_CONFIG'] = env_fpath
|
os.environ['SALT_MASTER_CONFIG'] = env_fpath
|
||||||
@ -871,7 +871,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
|
|||||||
'log_file: {1}\n'.format(root_dir, fpath)
|
'log_file: {1}\n'.format(root_dir, fpath)
|
||||||
)
|
)
|
||||||
# Let's set the environment variable, yet, since the configuration
|
# Let's set the environment variable, yet, since the configuration
|
||||||
# file path is not the default one, ie, the user has passed an
|
# file path is not the default one, i.e., the user has passed an
|
||||||
# alternative configuration file form the CLI parser, the
|
# alternative configuration file form the CLI parser, the
|
||||||
# environment variable will be ignored.
|
# environment variable will be ignored.
|
||||||
os.environ['SALT_CLOUD_CONFIG'] = env_fpath
|
os.environ['SALT_CLOUD_CONFIG'] = env_fpath
|
||||||
|
@ -417,9 +417,9 @@ class BotoVpcSubnetsTestCase(BotoVpcTestCaseBase):
|
|||||||
vpc_b = self.conn.create_vpc(cidr_block)
|
vpc_b = self.conn.create_vpc(cidr_block)
|
||||||
subnet_a = self._create_subnet(vpc_a.id, '10.0.0.0/24')
|
subnet_a = self._create_subnet(vpc_a.id, '10.0.0.0/24')
|
||||||
subnet_b = self._create_subnet(vpc_b.id, '10.0.0.0/24')
|
subnet_b = self._create_subnet(vpc_b.id, '10.0.0.0/24')
|
||||||
subnet_assocation = boto_vpc.get_subnet_association([subnet_a.id, subnet_b.id],
|
subnet_association = boto_vpc.get_subnet_association([subnet_a.id, subnet_b.id],
|
||||||
**conn_parameters)
|
**conn_parameters)
|
||||||
self.assertFalse(subnet_assocation)
|
self.assertFalse(subnet_association)
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
def test_that_when_creating_a_subnet_succeeds_the_create_subnet_method_returns_true(self):
|
def test_that_when_creating_a_subnet_succeeds_the_create_subnet_method_returns_true(self):
|
||||||
@ -1211,15 +1211,15 @@ class BotoVpcRouteTablesTestCase(BotoVpcTestCaseBase):
|
|||||||
def test_that_when_associating_a_route_table_succeeds_the_associate_route_table_method_should_return_the_association_id(
|
def test_that_when_associating_a_route_table_succeeds_the_associate_route_table_method_should_return_the_association_id(
|
||||||
self):
|
self):
|
||||||
'''
|
'''
|
||||||
Tests associating route table successsfully
|
Tests associating route table successfully
|
||||||
'''
|
'''
|
||||||
vpc = self._create_vpc()
|
vpc = self._create_vpc()
|
||||||
subnet = self._create_subnet(vpc.id)
|
subnet = self._create_subnet(vpc.id)
|
||||||
route_table = self._create_route_table(vpc.id)
|
route_table = self._create_route_table(vpc.id)
|
||||||
|
|
||||||
assocation_id = boto_vpc.associate_route_table(route_table.id, subnet.id, **conn_parameters)
|
association_id = boto_vpc.associate_route_table(route_table.id, subnet.id, **conn_parameters)
|
||||||
|
|
||||||
self.assertTrue(assocation_id)
|
self.assertTrue(association_id)
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
||||||
@ -1231,9 +1231,9 @@ class BotoVpcRouteTablesTestCase(BotoVpcTestCaseBase):
|
|||||||
vpc = self._create_vpc()
|
vpc = self._create_vpc()
|
||||||
subnet = self._create_subnet(vpc.id)
|
subnet = self._create_subnet(vpc.id)
|
||||||
|
|
||||||
assocation_id = boto_vpc.associate_route_table('fake', subnet.id, **conn_parameters)
|
association_id = boto_vpc.associate_route_table('fake', subnet.id, **conn_parameters)
|
||||||
|
|
||||||
self.assertFalse(assocation_id)
|
self.assertFalse(association_id)
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
||||||
@ -1245,9 +1245,9 @@ class BotoVpcRouteTablesTestCase(BotoVpcTestCaseBase):
|
|||||||
vpc = self._create_vpc()
|
vpc = self._create_vpc()
|
||||||
route_table = self._create_route_table(vpc.id)
|
route_table = self._create_route_table(vpc.id)
|
||||||
|
|
||||||
assocation_id = boto_vpc.associate_route_table(route_table.id, 'fake', **conn_parameters)
|
association_id = boto_vpc.associate_route_table(route_table.id, 'fake', **conn_parameters)
|
||||||
|
|
||||||
self.assertFalse(assocation_id)
|
self.assertFalse(association_id)
|
||||||
|
|
||||||
@mock_ec2
|
@mock_ec2
|
||||||
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
|
||||||
|
@ -250,7 +250,7 @@ class SyslogNGTestCase(TestCase):
|
|||||||
expected_output=mock_return_value)
|
expected_output=mock_return_value)
|
||||||
|
|
||||||
def _assert_template(self,
|
def _assert_template(self,
|
||||||
mock_funtion_args,
|
mock_function_args,
|
||||||
mock_return_value,
|
mock_return_value,
|
||||||
function_to_call,
|
function_to_call,
|
||||||
expected_output,
|
expected_output,
|
||||||
@ -261,7 +261,7 @@ class SyslogNGTestCase(TestCase):
|
|||||||
installed = True
|
installed = True
|
||||||
if not salt.utils.which("syslog-ng"):
|
if not salt.utils.which("syslog-ng"):
|
||||||
installed = False
|
installed = False
|
||||||
if "syslog-ng-ctl" in mock_funtion_args:
|
if "syslog-ng-ctl" in mock_function_args:
|
||||||
expected_output = _SYSLOG_NG_CTL_NOT_INSTALLED_RETURN_VALUE
|
expected_output = _SYSLOG_NG_CTL_NOT_INSTALLED_RETURN_VALUE
|
||||||
else:
|
else:
|
||||||
expected_output = _SYSLOG_NG_NOT_INSTALLED_RETURN_VALUE
|
expected_output = _SYSLOG_NG_NOT_INSTALLED_RETURN_VALUE
|
||||||
@ -276,7 +276,7 @@ class SyslogNGTestCase(TestCase):
|
|||||||
self.assertTrue(mock_function.called)
|
self.assertTrue(mock_function.called)
|
||||||
self.assertEqual(len(mock_function.call_args), 2)
|
self.assertEqual(len(mock_function.call_args), 2)
|
||||||
mock_param = mock_function.call_args
|
mock_param = mock_function.call_args
|
||||||
self.assertTrue(mock_param[0][0].endswith(mock_funtion_args))
|
self.assertTrue(mock_param[0][0].endswith(mock_function_args))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -319,7 +319,7 @@ class PipStateTest(TestCase, integration.SaltReturnAssertsMixIn):
|
|||||||
|
|
||||||
# Test VCS installations with version info like >= 0.1
|
# Test VCS installations with version info like >= 0.1
|
||||||
try:
|
try:
|
||||||
orignal_pip_version = pip.__version__
|
original_pip_version = pip.__version__
|
||||||
pip.__version__ = MagicMock(
|
pip.__version__ = MagicMock(
|
||||||
side_effect=AttributeError(
|
side_effect=AttributeError(
|
||||||
'Faked missing __version__ attribute'
|
'Faked missing __version__ attribute'
|
||||||
@ -351,7 +351,7 @@ class PipStateTest(TestCase, integration.SaltReturnAssertsMixIn):
|
|||||||
|
|
||||||
# Reset the version attribute if existing
|
# Reset the version attribute if existing
|
||||||
if hasattr(pip, '__version__'):
|
if hasattr(pip, '__version__'):
|
||||||
pip.__version__ = orignal_pip_version
|
pip.__version__ = original_pip_version
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user