fix numerous typos+misspellings

This commit is contained in:
Chris Rebert 2014-11-05 13:57:47 -08:00
parent b142a47109
commit b9bb56841d
46 changed files with 83 additions and 83 deletions

View File

@ -182,7 +182,7 @@ class Authorize(object):
def auth_data(self):
'''
Gather and create the autorization data sets
Gather and create the authorization data sets
'''
auth_data = self.opts['external_auth']
#for auth_back in self.opts.get('external_auth_sources', []):

View File

@ -153,7 +153,7 @@ class Shell(object):
'''
if self.passwd:
# Using single quotes prevents shell expansion and
# passwords containig '$'
# passwords containing '$'
return "{0} {1} '{2} -p {3} {4}@{5}'".format(
'ssh-copy-id',
'-i {0}.pub'.format(self.priv),
@ -170,7 +170,7 @@ class Shell(object):
'''
if self.passwd:
# Using single quotes prevents shell expansion and
# passwords containig '$'
# passwords containing '$'
return "{0} {1} {2} -p {3} {4}@{5}".format(
'ssh-copy-id',
'-i {0}.pub'.format(self.priv),

View File

@ -445,7 +445,7 @@ def _wait_for_spot_instance(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
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.
:param interval_multiplier: Increase the interval by this multiplier after
each request; helps with throttling

View File

@ -639,7 +639,7 @@ def avail_locations(call=None):
}
# 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
# ret = {}
# rcode, datacenters = query(

View File

@ -71,7 +71,7 @@ def check_libcloud_version(reqver=LIBCLOUD_MINIMAL_VERSION, why=None):
if not isinstance(reqver, (list, tuple)):
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:
import libcloud # pylint: disable=redefined-outer-name

View File

@ -773,7 +773,7 @@ def load_config(path, env_var, default_path=None):
return {}
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
# argument. Let's issue a warning message that the environ vars won't
# work.

View File

@ -937,7 +937,7 @@ class RemoteClient(Client):
saltenv = env
# Hash compare local copy with master and skip download
# if no diference found.
# if no difference found.
dest2check = dest
if not dest2check:
rel_path = self._check_proto(path)

View File

@ -158,7 +158,7 @@ class KeyCLI(object):
'''
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)

View File

@ -943,7 +943,7 @@ class Loader(object):
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
# removed during sync_modules)
for submodule in submodules:
@ -1048,7 +1048,7 @@ class Loader(object):
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
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
second value is the determined virtual name, which may be the same as
the value provided.

View File

@ -103,7 +103,7 @@ class SaltLoggingClass(LOGGING_LOGGER_CLASS, NewStyleClassMixIn):
is being used, and also some Unicode fixes.
This code overhead will only be executed when the class is
instantiated, ie:
instantiated, i.e.:
logging.getLogger(__name__)

View File

@ -91,7 +91,7 @@ class SMaster(object):
class Maintenance(multiprocessing.Process):
'''
A generalized maintenence process which performances maintenence
A generalized maintenance process which performances maintenance
routines.
'''
def __init__(self, opts):

View File

@ -117,7 +117,7 @@ def execute(context=None, lens=None, commands=()):
aug.load()
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)
if cmd not in method_map:
ret['error'] = 'Command {0} is not supported (yet)'.format(cmd)

View File

@ -356,7 +356,7 @@ def detach_subnets(name, subnets, region=None, key=None, keyid=None,
subnets = json.loads(subnets)
try:
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)
return True
except boto.exception.BotoServerError as e:

View File

@ -445,7 +445,7 @@ def _run(cmd,
# cases
ret['stdout'] = stdout
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
ret['stderr'] = stderr
ret['retcode'] = proc.exitstatus

View File

@ -141,7 +141,7 @@ def search_keys(text, keyserver=None, user=None):
Search keys from keyserver
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 to use for searching for GPG keys, defaults to pgp.mit.edu
@ -287,7 +287,7 @@ def create_key(key_type='RSA',
package.
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
The type of the primary key to generate. It must be capable of signing.

View File

@ -125,7 +125,7 @@ def cloud_init_interface(name, vm_=None, **kwargs):
This is a list of mappings ``{ip: '', mac: '',netmask:''}``
Set gateway to ``None`` and an interface with a gateway
to escape from another interface that's eth0.
eg:
e.g.:
.. code-block:: python
@ -737,7 +737,7 @@ def init(name,
This can be either a real profile mapping or a string
to retrieve it in configuration
nic_opts
Extra options for network interfaces. E.g:
Extra options for network interfaces. E.g.:
.. code-block:: bash

View File

@ -49,7 +49,7 @@ def _porttree():
def _p_to_cp(p):
'''
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)
if ret:

View File

@ -1,6 +1,6 @@
# -*- 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

View File

@ -52,7 +52,7 @@ def _ips_get_pkgname(line):
'''
Extracts package name from "pkg list -v" 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:
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)
@ -64,7 +64,7 @@ def _ips_get_pkgversion(line):
'''
Extracts package version from "pkg list -v" 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:
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)
@ -411,7 +411,7 @@ def install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwa
output['message'] = ret['stderr'] + '\n'
return output
# No error occured
# No error occurred
if test:
return "Test succeeded."
@ -478,7 +478,7 @@ def remove(name=None, pkgs=None, **kwargs):
output['message'] = ret['stderr'] + '\n'
return output
# No error occured
# No error occurred
return changes

View File

@ -125,7 +125,7 @@ if _check_zfs():
for available_cmd in available_cmds:
# 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(
sys.modules[__name__],
'{0}_'.format(available_cmd),

View File

@ -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.
.. 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
new :ref:`function-declaration` is created.

View File

@ -28,8 +28,8 @@ Creating state data
^^^^^^^^^^^^^^^^^^^
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
version of its name (ie. ``File``, ``Service``, ``User``, etc), and these
objects expose all of their available state functions (ie. ``File.managed``,
version of its name (i.e. ``File``, ``Service``, ``User``, etc), and these
objects expose all of their available state functions (i.e. ``File.managed``,
``Service.running``, etc).
The name of the state is split based upon underscores (``_``), then each part

View File

@ -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!
#
# TODO:
# - sls meta/info state: Eg,
# - sls meta/info state: E.g.,
#
# sls_info:
# stateconf.set:
@ -20,7 +20,7 @@ A flexible renderer that takes a templating engine and a data format
# - description: what the salt file does...
# - version: 0.1.0
#
# - version constraint for 'include'. Eg,
# - version constraint for 'include'. E.g.,
#
# include:
# - apache: >= 0.1.0
@ -453,7 +453,7 @@ def add_implicit_requires(data):
if prev_state[0] is not None:
try:
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])]))
states_before.add(tag)

View File

@ -163,7 +163,7 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
A LXC profile (defined in config or pillar).
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"}}``

View File

@ -1537,8 +1537,8 @@ class State(object):
except Exception:
trb = traceback.format_exc()
# There are a number of possibilities to not have the cdata
# populated with what we might have expected, so just be enought
# smart to not raise another KeyError as the name is easily
# populated with what we might have expected, so just be smart
# enough to not raise another KeyError as the name is easily
# guessable and fallback in all cases to present the real
# exception to the user
if len(cdata['args']) > 0:

View File

@ -95,7 +95,7 @@ def present(name, cloud_provider, onlyif=None, unless=None, **kwargs):
return _valid(name, comment='unless execution succeeded')
# 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):
ret['result'] = True
ret['comment'] = 'Already present instance {0}'.format(name)

View File

@ -379,7 +379,7 @@ def _get_recurse_dest(prefix, fn_, source, env):
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.
for root in local_roots:
rootlen = len(root)

View File

@ -132,7 +132,7 @@ def mounted(name,
# When included in a Salt state file, FUSE
# 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
# that the device is a FUSE device then we
# remove the prefaced string so that the device in

View File

@ -82,7 +82,7 @@ def present(name,
The grant priv_type (i.e. select,insert,update OR all privileges)
database
The database priv_level (ie. db.tbl OR db.*)
The database priv_level (i.e. db.tbl OR db.*)
user
The user to apply the grant to

View File

@ -148,8 +148,8 @@ def template_shebang(template, renderers, default):
return render_pipe
# A dict of combined renderer(ie, rend1_rend2_...) to
# render-pipe(ie, rend1|rend2|...)
# A dict of combined renderer (i.e., rend1_rend2_...) to
# render-pipe (i.e., rend1|rend2|...)
#
OLD_STYLE_RENDERERS = {}

View File

@ -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
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:
# We don't work on platforms that don't have grp and pwd

View File

@ -586,7 +586,7 @@ def wait_for_port(host, port=22, timeout=900, gateway=None):
ssh_args.extend([
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-oControlPath=none'
@ -1441,7 +1441,7 @@ def scp_file(dest_path, contents, kwargs):
ssh_args = [
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-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(
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-oControlPath=none',
@ -1559,7 +1559,7 @@ def sftp_file(dest_path, contents=None, kwargs=None, local_file=None):
ssh_args = [
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-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(
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-oControlPath=none',
@ -1682,7 +1682,7 @@ def root_cmd(command, tty, sudo, allow_failure=False, **kwargs):
ssh_args.extend([
# Don't add new hosts to the host key database
'-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),
# Don't re-use the SSH connection. Less failures.
'-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(
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-oControlPath=none',
@ -1861,7 +1861,7 @@ def wait_for_ip(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
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.
:param interval_multiplier: Increase the interval by this multiplier after
each request; helps with throttling
@ -1920,7 +1920,7 @@ def wait_for_ip(update_callback,
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.
'''
if data is None:

View File

@ -78,8 +78,8 @@ def enable_sigusr1_handler():
when any of the salt daemons such as salt-master are sent a SIGUSR1
'''
enable_sig_handler('SIGUSR1', _handle_sigusr1)
# Also canonical BSD-way of printing profress is SIGINFO
# which on BSD-deriviatives can be sent via Ctrl+T
# Also canonical BSD-way of printing progress is SIGINFO
# which on BSD-derivatives can be sent via Ctrl+T
enable_sig_handler('SIGINFO', _handle_sigusr1)

View File

@ -163,7 +163,7 @@ def identical_signature_wrapper(original_function, wrapped_function):
' return __wrapped__({2})'.format(
# Keep the 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.getargspec(original_function)
)[1:-1],

View File

@ -555,7 +555,7 @@ class ConnectedCache(multiprocessing.Process):
except KeyboardInterrupt:
self.stop()
except zmq.ZMQError as zmq_err:
log.error('ConCache ZeroMQ-Error occured')
log.error('ConCache ZeroMQ-Error occurred')
log.exception(zmq_err)
self.stop()

View File

@ -275,7 +275,7 @@ class CkMinions(object):
'''
if not HAS_RANGE:
raise CommandExecutionError(
'Range matcher unavailble (unable to import seco.range, '
'Range matcher unavailable (unable to import seco.range, '
'module most likely not installed)'
)
cache_enabled = self.opts.get('minion_data_cache', False)

View File

@ -514,7 +514,7 @@ class LogLevelMixIn(object):
)
if self.config.get(cli_setting_name, None) is not None:
# 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)
elif self.config.get(self._logfile_config_setting_name_, None):
# 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:
# 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`
self.options.log_file_level = self.config.get(cli_setting_name)
elif self.config.get(

View File

@ -198,7 +198,7 @@ class State(object):
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
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.
'''

View File

@ -223,7 +223,7 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
if not saltenv:
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
# it? At least it ain't according to:
@ -344,7 +344,7 @@ def render_mako_tmpl(tmplstr, context, tmplpath=None):
lookup = None
if not saltenv:
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
lookup = TemplateLookup(directories=[os.path.dirname(tmplpath)])
else:

View File

@ -19,7 +19,7 @@ except ImportError:
# ----- 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):
#

View File

@ -592,7 +592,7 @@ def build_scp_command(options, *arguments):
os.path.join(options.workspace, 'jenkins_ssh_key_test'),
# Don't add new hosts to the host key database
'-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',
# Don't re-use the SSH connection. Less failures.
'-oControlPath=none',

View File

@ -159,7 +159,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
'log_file: {1}\n'.format(root_dir, fpath)
)
# 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
# environment variable will be ignored.
os.environ['SALT_MASTER_CONFIG'] = env_fpath
@ -201,7 +201,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
'log_file: {1}\n'.format(root_dir, fpath)
)
# 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
# environment variable will be ignored.
os.environ['SALT_MINION_CONFIG'] = env_fpath
@ -255,7 +255,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
'log_file: {1}\n'.format(root_dir, fpath)
)
# 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
# environment variable will be ignored.
os.environ['SALT_MASTER_CONFIG'] = env_fpath
@ -871,7 +871,7 @@ class ConfigTestCase(TestCase, integration.AdaptedConfigurationTestCaseMixIn):
'log_file: {1}\n'.format(root_dir, fpath)
)
# 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
# environment variable will be ignored.
os.environ['SALT_CLOUD_CONFIG'] = env_fpath

View File

@ -417,9 +417,9 @@ class BotoVpcSubnetsTestCase(BotoVpcTestCaseBase):
vpc_b = self.conn.create_vpc(cidr_block)
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_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)
self.assertFalse(subnet_assocation)
self.assertFalse(subnet_association)
@mock_ec2
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(
self):
'''
Tests associating route table successsfully
Tests associating route table successfully
'''
vpc = self._create_vpc()
subnet = self._create_subnet(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
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
@ -1231,9 +1231,9 @@ class BotoVpcRouteTablesTestCase(BotoVpcTestCaseBase):
vpc = self._create_vpc()
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
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')
@ -1245,9 +1245,9 @@ class BotoVpcRouteTablesTestCase(BotoVpcTestCaseBase):
vpc = self._create_vpc()
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
@skipIf(True, 'Moto has not implemented this feature. Skipping for now.')

View File

@ -250,7 +250,7 @@ class SyslogNGTestCase(TestCase):
expected_output=mock_return_value)
def _assert_template(self,
mock_funtion_args,
mock_function_args,
mock_return_value,
function_to_call,
expected_output,
@ -261,7 +261,7 @@ class SyslogNGTestCase(TestCase):
installed = True
if not salt.utils.which("syslog-ng"):
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
else:
expected_output = _SYSLOG_NG_NOT_INSTALLED_RETURN_VALUE
@ -276,7 +276,7 @@ class SyslogNGTestCase(TestCase):
self.assertTrue(mock_function.called)
self.assertEqual(len(mock_function.call_args), 2)
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__':

View File

@ -319,7 +319,7 @@ class PipStateTest(TestCase, integration.SaltReturnAssertsMixIn):
# Test VCS installations with version info like >= 0.1
try:
orignal_pip_version = pip.__version__
original_pip_version = pip.__version__
pip.__version__ = MagicMock(
side_effect=AttributeError(
'Faked missing __version__ attribute'
@ -351,7 +351,7 @@ class PipStateTest(TestCase, integration.SaltReturnAssertsMixIn):
# Reset the version attribute if existing
if hasattr(pip, '__version__'):
pip.__version__ = orignal_pip_version
pip.__version__ = original_pip_version
if __name__ == '__main__':