1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #7439/2b628260 backport][stable-7] Fix more typos (#7445)

Fix more typos (#7439)

* Fix more typos in plugins/.

* Fix typos in tests/unit/.

* Fix typos in tests/integration/.

* Fix more typos.

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
(cherry picked from commit 2b62826082)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-10-29 20:26:39 +01:00 committed by GitHub
parent 985fbb321b
commit 2ed7e96372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 99 additions and 99 deletions

View file

@ -44,7 +44,7 @@ class ActionModule(ActionBase):
def _async_result(self, async_status_args, task_vars, timeout): def _async_result(self, async_status_args, task_vars, timeout):
''' '''
Retrieve results of the asynchonous task, and display them in place of Retrieve results of the asynchronous task, and display them in place of
the async wrapper results (those with the ansible_job_id key). the async wrapper results (those with the ansible_job_id key).
''' '''
async_status = self._task.copy() async_status = self._task.copy()

View file

@ -150,7 +150,7 @@ class CacheModule(BaseCacheModule):
# format: "localhost:26379;localhost2:26379;0:changeme" # format: "localhost:26379;localhost2:26379;0:changeme"
connections = uri.split(';') connections = uri.split(';')
connection_args = connections.pop(-1) connection_args = connections.pop(-1)
if len(connection_args) > 0: # hanle if no db nr is given if len(connection_args) > 0: # handle if no db nr is given
connection_args = connection_args.split(':') connection_args = connection_args.split(':')
kw['db'] = connection_args.pop(0) kw['db'] = connection_args.pop(0)
try: try:

View file

@ -14,7 +14,7 @@ DOCUMENTATION = '''
short_description: Post task results to a Nagios server through nrdp short_description: Post task results to a Nagios server through nrdp
description: description:
- This callback send playbook result to Nagios. - This callback send playbook result to Nagios.
- Nagios shall use NRDP to recive passive events. - Nagios shall use NRDP to receive passive events.
- The passive check is sent to a dedicated host/service for Ansible. - The passive check is sent to a dedicated host/service for Ansible.
options: options:
url: url:

View file

@ -15,7 +15,7 @@ DOCUMENTATION = '''
- set as main display callback - set as main display callback
short_description: Don't display stuff to screen short_description: Don't display stuff to screen
description: description:
- This callback prevents outputing events to screen. - This callback prevents outputting events to screen.
''' '''
from ansible.plugins.callback import CallbackBase from ansible.plugins.callback import CallbackBase
@ -24,7 +24,7 @@ from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase): class CallbackModule(CallbackBase):
''' '''
This callback wont print messages to stdout when new callback events are received. This callback won't print messages to stdout when new callback events are received.
''' '''
CALLBACK_VERSION = 2.0 CALLBACK_VERSION = 2.0

View file

@ -70,7 +70,7 @@ class Connection(ConnectionBase):
if in_data: if in_data:
raise AnsibleError("Internal Error: this module does not support optimized module pipelining") raise AnsibleError("Internal Error: this module does not support optimized module pipelining")
# totally ignores privlege escalation # totally ignores privilege escalation
display.vvv("EXEC %s" % cmd, host=self.host) display.vvv("EXEC %s" % cmd, host=self.host)
p = self.client.command.run(cmd)[self.host] p = self.client.command.run(cmd)[self.host]
return p[0], p[1], p[2] return p[0], p[1], p[2]

View file

@ -47,6 +47,6 @@ options:
type: str type: str
token: token:
description: description:
- ACL token for authentification. - ACL token for authentication.
type: str type: str
''' '''

View file

@ -70,7 +70,7 @@ DOCUMENTATION = r'''
version_added: 4.2.0 version_added: 4.2.0
prefered_instance_network_interface: prefered_instance_network_interface:
description: description:
- If an instance has multiple network interfaces, select which one is the prefered as pattern. - If an instance has multiple network interfaces, select which one is the preferred as pattern.
- Combined with the first number that can be found e.g. 'eth' + 0. - Combined with the first number that can be found e.g. 'eth' + 0.
- The option has been renamed from O(prefered_container_network_interface) to O(prefered_instance_network_interface) - The option has been renamed from O(prefered_container_network_interface) to O(prefered_instance_network_interface)
in community.general 3.8.0. The old name still works as an alias. in community.general 3.8.0. The old name still works as an alias.
@ -80,7 +80,7 @@ DOCUMENTATION = r'''
- prefered_container_network_interface - prefered_container_network_interface
prefered_instance_network_family: prefered_instance_network_family:
description: description:
- If an instance has multiple network interfaces, which one is the prefered by family. - If an instance has multiple network interfaces, which one is the preferred by family.
- Specify V(inet) for IPv4 and V(inet6) for IPv6. - Specify V(inet) for IPv4 and V(inet6) for IPv6.
type: str type: str
default: inet default: inet
@ -376,7 +376,7 @@ class InventoryModule(BaseInventoryPlugin):
def get_instance_data(self, names): def get_instance_data(self, names):
"""Create Inventory of the instance """Create Inventory of the instance
Iterate through the different branches of the instances and collect Informations. Iterate through the different branches of the instances and collect Information.
Args: Args:
list(names): List of instance names list(names): List of instance names
@ -398,7 +398,7 @@ class InventoryModule(BaseInventoryPlugin):
def get_network_data(self, names): def get_network_data(self, names):
"""Create Inventory of the instance """Create Inventory of the instance
Iterate through the different branches of the instances and collect Informations. Iterate through the different branches of the instances and collect Information.
Args: Args:
list(names): List of instance names list(names): List of instance names
@ -451,9 +451,9 @@ class InventoryModule(BaseInventoryPlugin):
return network_configuration return network_configuration
def get_prefered_instance_network_interface(self, instance_name): def get_prefered_instance_network_interface(self, instance_name):
"""Helper to get the prefered interface of thr instance """Helper to get the preferred interface of thr instance
Helper to get the prefered interface provide by neme pattern from 'prefered_instance_network_interface'. Helper to get the preferred interface provide by neme pattern from 'prefered_instance_network_interface'.
Args: Args:
str(containe_name): name of instance str(containe_name): name of instance
@ -563,7 +563,7 @@ class InventoryModule(BaseInventoryPlugin):
else: else:
path[instance_name][key] = value path[instance_name][key] = value
except KeyError as err: except KeyError as err:
raise AnsibleParserError("Unable to store Informations: {0}".format(to_native(err))) raise AnsibleParserError("Unable to store Information: {0}".format(to_native(err)))
def extract_information_from_instance_configs(self): def extract_information_from_instance_configs(self):
"""Process configuration information """Process configuration information
@ -683,7 +683,7 @@ class InventoryModule(BaseInventoryPlugin):
continue continue
# add instance # add instance
self.inventory.add_host(instance_name) self.inventory.add_host(instance_name)
# add network informations # add network information
self.build_inventory_network(instance_name) self.build_inventory_network(instance_name)
# add os # add os
v = self._get_data_entry('inventory/{0}/os'.format(instance_name)) v = self._get_data_entry('inventory/{0}/os'.format(instance_name))

View file

@ -494,7 +494,7 @@ class OnePassCLIv2(OnePassCLIBase):
if field.get("id") == field_name: if field.get("id") == field_name:
return field.get("value", "") return field.get("value", "")
# Look at the section data and get an indentifier. The value of 'id' is either a unique ID # Look at the section data and get an identifier. The value of 'id' is either a unique ID
# or a human-readable string. If a 'label' field exists, prefer that since # or a human-readable string. If a 'label' field exists, prefer that since
# it is the value visible in the 1Password UI when both 'id' and 'label' exist. # it is the value visible in the 1Password UI when both 'id' and 'label' exist.
section = field.get("section", {}) section = field.get("section", {})

View file

@ -72,7 +72,7 @@ DOCUMENTATION = r"""
type: int type: int
override_special: override_special:
description: description:
- Overide a list of special characters to use in the string. - Override a list of special characters to use in the string.
- If set O(min_special) should be set to a non-default value. - If set O(min_special) should be set to a non-default value.
type: str type: str
override_all: override_all:
@ -89,7 +89,7 @@ DOCUMENTATION = r"""
version_added: 7.5.0 version_added: 7.5.0
similar_chars: similar_chars:
description: description:
- Overide a list of characters not to be use in the string. - Override a list of characters not to be use in the string.
default: "il1LoO0" default: "il1LoO0"
type: str type: str
version_added: 7.5.0 version_added: 7.5.0
@ -116,7 +116,7 @@ EXAMPLES = r"""
var: lookup('community.general.random_string', base64=True) var: lookup('community.general.random_string', base64=True)
# Example result: ['NHZ6eWN5Qk0='] # Example result: ['NHZ6eWN5Qk0=']
- name: Generate a random string with 1 lower, 1 upper, 1 number and 1 special char (atleast) - name: Generate a random string with 1 lower, 1 upper, 1 number and 1 special char (at least)
ansible.builtin.debug: ansible.builtin.debug:
var: lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) var: lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1)
# Example result: ['&Qw2|E[-'] # Example result: ['&Qw2|E[-']

View file

@ -39,7 +39,7 @@ except ImportError:
LIBCLOUD_IMP_ERR = traceback.format_exc() LIBCLOUD_IMP_ERR = traceback.format_exc()
HAS_LIBCLOUD = False HAS_LIBCLOUD = False
# MCP 2.x version patten for location (datacenter) names. # MCP 2.x version pattern for location (datacenter) names.
# #
# Note that this is not a totally reliable way of determining MCP version. # Note that this is not a totally reliable way of determining MCP version.
# Unfortunately, libcloud's NodeLocation currently makes no provision for extended properties. # Unfortunately, libcloud's NodeLocation currently makes no provision for extended properties.

View file

@ -203,7 +203,7 @@ class Config(object):
if url == "": if url == "":
raise HwcClientException( raise HwcClientException(
0, "Can not find the enpoint for %s" % service_type) 0, "Cannot find the endpoint for %s" % service_type)
if url[-1] != "/": if url[-1] != "/":
url += "/" url += "/"
@ -351,7 +351,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3):
if pending and status not in pending: if pending and status not in pending:
raise HwcModuleException( raise HwcModuleException(
"unexpect status(%s) occurred" % status) "unexpected status(%s) occurred" % status)
if not is_last_time: if not is_last_time:
wait *= 2 wait *= 2
@ -362,7 +362,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3):
time.sleep(wait) time.sleep(wait)
raise HwcModuleException("asycn wait timeout after %d seconds" % timeout) raise HwcModuleException("async wait timeout after %d seconds" % timeout)
def navigate_value(data, index, array_index=None): def navigate_value(data, index, array_index=None):

View file

@ -544,7 +544,7 @@ class KeycloakAPI(object):
return None return None
def get_client_group_available_rolemappings(self, gid, cid, realm="master"): def get_client_group_available_rolemappings(self, gid, cid, realm="master"):
""" Fetch the available role of a client in a specified goup on the Keycloak server. """ Fetch the available role of a client in a specified group on the Keycloak server.
:param gid: ID of the group from which to obtain the rolemappings. :param gid: ID of the group from which to obtain the rolemappings.
:param cid: ID of the client from which to obtain the rolemappings. :param cid: ID of the client from which to obtain the rolemappings.
@ -627,7 +627,7 @@ class KeycloakAPI(object):
% (rid, realm, str(e))) % (rid, realm, str(e)))
def add_group_rolemapping(self, gid, cid, role_rep, realm="master"): def add_group_rolemapping(self, gid, cid, role_rep, realm="master"):
""" Fetch the composite role of a client in a specified goup on the Keycloak server. """ Fetch the composite role of a client in a specified group on the Keycloak server.
:param gid: ID of the group from which to obtain the rolemappings. :param gid: ID of the group from which to obtain the rolemappings.
:param cid: ID of the client from which to obtain the rolemappings. :param cid: ID of the client from which to obtain the rolemappings.
@ -1238,7 +1238,7 @@ class KeycloakAPI(object):
:param realm: Realm in which the clientscope resides. :param realm: Realm in which the clientscope resides.
:param client_id: The client in which the clientscope resides. :param client_id: The client in which the clientscope resides.
:return The optinal clientscopes of this realm or client :return The optional clientscopes of this realm or client
""" """
url = URL_OPTIONAL_CLIENTSCOPES if client_id is None else URL_CLIENT_OPTIONAL_CLIENTSCOPES url = URL_OPTIONAL_CLIENTSCOPES if client_id is None else URL_CLIENT_OPTIONAL_CLIENTSCOPES
return self._get_clientscopes_of_type(realm, url, 'optional', client_id) return self._get_clientscopes_of_type(realm, url, 'optional', client_id)
@ -1251,7 +1251,7 @@ class KeycloakAPI(object):
:param realm: Realm in which the clientscope resides. :param realm: Realm in which the clientscope resides.
:param url_template the template for the right type :param url_template the template for the right type
:param scope_type this can be either optinal or default :param scope_type this can be either optional or default
:param client_id: The client in which the clientscope resides. :param client_id: The client in which the clientscope resides.
:return The clientscopes of the specified type of this realm :return The clientscopes of the specified type of this realm
""" """
@ -1273,7 +1273,7 @@ class KeycloakAPI(object):
def _decide_url_type_clientscope(self, client_id=None, scope_type="default"): def _decide_url_type_clientscope(self, client_id=None, scope_type="default"):
"""Decides which url to use. """Decides which url to use.
:param scope_type this can be either optinal or default :param scope_type this can be either optional or default
:param client_id: The client in which the clientscope resides. :param client_id: The client in which the clientscope resides.
""" """
if client_id is None: if client_id is None:
@ -1520,7 +1520,7 @@ class KeycloakAPI(object):
def get_subgroup_direct_parent(self, parents, realm="master", children_to_resolve=None): def get_subgroup_direct_parent(self, parents, realm="master", children_to_resolve=None):
""" Get keycloak direct parent group API object for a given chain of parents. """ Get keycloak direct parent group API object for a given chain of parents.
To succesfully work the API for subgroups we actually dont need To successfully work the API for subgroups we actually don't need
to "walk the whole tree" for nested groups but only need to know to "walk the whole tree" for nested groups but only need to know
the ID for the direct predecessor of current subgroup. This the ID for the direct predecessor of current subgroup. This
method will guarantee us this information getting there with method will guarantee us this information getting there with
@ -2879,7 +2879,7 @@ class KeycloakAPI(object):
groups_to_add_and_remove = self.extract_groups_to_add_to_and_remove_from_user(groups) groups_to_add_and_remove = self.extract_groups_to_add_to_and_remove_from_user(groups)
# If group membership need to be changed # If group membership need to be changed
if not is_struct_included(groups_to_add_and_remove['add'], user_existing_groups): if not is_struct_included(groups_to_add_and_remove['add'], user_existing_groups):
# Get available goups in the realm # Get available groups in the realm
realm_groups = self.get_groups(realm=realm) realm_groups = self.get_groups(realm=realm)
for realm_group in realm_groups: for realm_group in realm_groups:
if "name" in realm_group and realm_group["name"] in groups_to_add_and_remove['add']: if "name" in realm_group and realm_group["name"] in groups_to_add_and_remove['add']:

View file

@ -79,7 +79,7 @@ def memset_api_call(api_key, api_method, payload=None):
msg = "Memset API returned an error ({0}, {1})." . format(response.json()['error_type'], response.json()['error']) msg = "Memset API returned an error ({0}, {1})." . format(response.json()['error_type'], response.json()['error'])
except urllib_error.URLError as e: except urllib_error.URLError as e:
has_failed = True has_failed = True
msg = "An URLError occured ({0})." . format(type(e)) msg = "An URLError occurred ({0})." . format(type(e))
response.stderr = "{0}" . format(e) response.stderr = "{0}" . format(e)
if msg is None: if msg is None:

View file

@ -331,7 +331,7 @@ def pritunl_auth_request(
): ):
""" """
Send an API call to a Pritunl server. Send an API call to a Pritunl server.
Taken from https://pritunl.com/api and adaped work with Ansible open_url Taken from https://pritunl.com/api and adapted to work with Ansible open_url
""" """
auth_timestamp = str(int(time.time())) auth_timestamp = str(int(time.time()))
auth_nonce = uuid.uuid4().hex auth_nonce = uuid.uuid4().hex

View file

@ -434,7 +434,7 @@ def check_and_update_attributes(
target_instance, attr_name, input_value, existing_value, changed target_instance, attr_name, input_value, existing_value, changed
): ):
""" """
This function checks the difference between two resource attributes of literal types and sets the attrbute This function checks the difference between two resource attributes of literal types and sets the attribute
value in the target instance type holding the attribute. value in the target instance type holding the attribute.
:param target_instance: The instance which contains the attribute whose values to be compared :param target_instance: The instance which contains the attribute whose values to be compared
:param attr_name: Name of the attribute whose value required to be compared :param attr_name: Name of the attribute whose value required to be compared
@ -785,7 +785,7 @@ def _get_attributes_to_consider(exclude_attributes, model, module):
attributes_to_consider = list(model.attribute_map) attributes_to_consider = list(model.attribute_map)
if "freeform_tags" in attributes_to_consider: if "freeform_tags" in attributes_to_consider:
attributes_to_consider.remove("freeform_tags") attributes_to_consider.remove("freeform_tags")
# Temporarily removing node_count as the exisiting resource does not reflect it # Temporarily removing node_count as the existing resource does not reflect it
if "node_count" in attributes_to_consider: if "node_count" in attributes_to_consider:
attributes_to_consider.remove("node_count") attributes_to_consider.remove("node_count")
_debug("attributes to consider: {0}".format(attributes_to_consider)) _debug("attributes to consider: {0}".format(attributes_to_consider))
@ -1771,7 +1771,7 @@ def update_class_type_attr_difference(
): ):
""" """
Checks the difference and updates an attribute which is represented by a class Checks the difference and updates an attribute which is represented by a class
instance. Not aplicable if the attribute type is a primitive value. instance. Not applicable if the attribute type is a primitive value.
For example, if a class name is A with an attribute x, then if A.x = X(), then only For example, if a class name is A with an attribute x, then if A.x = X(), then only
this method works. this method works.
:param update_class_details The instance which should be updated if there is change in :param update_class_details The instance which should be updated if there is change in
@ -1933,7 +1933,7 @@ def get_target_resource_from_list(
module, list_resource_fn, target_resource_id=None, **kwargs module, list_resource_fn, target_resource_id=None, **kwargs
): ):
""" """
Returns a resource filtered by identifer from a list of resources. This method should be Returns a resource filtered by identifier from a list of resources. This method should be
used as an alternative of 'get resource' method when 'get resource' is nor provided by used as an alternative of 'get resource' method when 'get resource' is nor provided by
resource api. This method returns a wrapper of response object but that should not be resource api. This method returns a wrapper of response object but that should not be
used as an input to 'wait_until' utility as this is only a partial wrapper of response object. used as an input to 'wait_until' utility as this is only a partial wrapper of response object.

View file

@ -327,7 +327,7 @@ class RedfishUtils(object):
found in ansible.module_utils.urls, but it takes files and encodes them found in ansible.module_utils.urls, but it takes files and encodes them
as Base64 strings, which is not expected by Redfish services. It also as Base64 strings, which is not expected by Redfish services. It also
adds escaping of certain bytes in the payload, such as inserting '\r' adds escaping of certain bytes in the payload, such as inserting '\r'
any time it finds a standlone '\n', which corrupts the image payload any time it finds a standalone '\n', which corrupts the image payload
send to the service. This implementation is simplified to Redfish's send to the service. This implementation is simplified to Redfish's
usage and doesn't necessarily represent an exhaustive method of usage and doesn't necessarily represent an exhaustive method of
building multipart requests. building multipart requests.
@ -3703,12 +3703,12 @@ class RedfishUtils(object):
rsp_uri = loc['Uri'] rsp_uri = loc['Uri']
if vendor == 'HPE': if vendor == 'HPE':
# WORKAROUND # WORKAROUND
# HPE systems with iLO 4 will have BIOS Atrribute Registries location URI as a dictonary with key 'extref' # HPE systems with iLO 4 will have BIOS Attribute Registries location URI as a dictionary with key 'extref'
# Hence adding condition to fetch the Uri # Hence adding condition to fetch the Uri
if type(loc['Uri']) is dict and "extref" in loc['Uri'].keys(): if type(loc['Uri']) is dict and "extref" in loc['Uri'].keys():
rsp_uri = loc['Uri']['extref'] rsp_uri = loc['Uri']['extref']
if not rsp_uri: if not rsp_uri:
msg = "Language 'en' not found in BIOS Atrribute Registries location, URI: %s, response: %s" msg = "Language 'en' not found in BIOS Attribute Registries location, URI: %s, response: %s"
return { return {
"ret": False, "ret": False,
"msg": msg % (resp_uri, str(resp_data)) "msg": msg % (resp_uri, str(resp_data))

View file

@ -303,7 +303,7 @@ class Scaleway(object):
wait_timeout = self.module.params["wait_timeout"] wait_timeout = self.module.params["wait_timeout"]
wait_sleep_time = self.module.params["wait_sleep_time"] wait_sleep_time = self.module.params["wait_sleep_time"]
# Prevent requesting the ressource status too soon # Prevent requesting the resource status too soon
time.sleep(wait_sleep_time) time.sleep(wait_sleep_time)
start = datetime.datetime.utcnow() start = datetime.datetime.utcnow()

View file

@ -49,7 +49,7 @@ class _Variable(object):
output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None. output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None.
diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None. diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None.
change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None. change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None.
fact (bool, optional): flag indicating whether the varaiable should be exposed as a fact of the module. Defaults to None. fact (bool, optional): flag indicating whether the variable should be exposed as a fact of the module. Defaults to None.
initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING. initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING.
verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None. verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None.
""" """
@ -127,7 +127,7 @@ class VarDict(object):
output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None. output (bool, optional): flag indicating whether the variable should be in the output of the module. Defaults to None.
diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None. diff (bool, optional): flag indicating whether to generate diff mode output for this variable. Defaults to None.
change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None. change (bool, optional): flag indicating whether to track if changes happened to this variable. Defaults to None.
fact (bool, optional): flag indicating whether the varaiable should be exposed as a fact of the module. Defaults to None. fact (bool, optional): flag indicating whether the variable should be exposed as a fact of the module. Defaults to None.
initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING. initial_value (any, optional): initial value of the variable, to be used with `change`. Defaults to NOTHING.
verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None. verbosity (int, optional): level of verbosity in which this variable is reported by the module as `output`, `fact` or `diff`. Defaults to None.
""" """

View file

@ -182,7 +182,7 @@ class WdcRedfishUtils(RedfishUtils):
:param str bundle_uri: HTTP URI of the firmware bundle. :param str bundle_uri: HTTP URI of the firmware bundle.
:return: Firmware version number contained in the bundle, and whether or not the bundle is multi-tenant. :return: Firmware version number contained in the bundle, and whether or not the bundle is multi-tenant.
Either value will be None if unable to deterine. Either value will be None if unable to determine.
:rtype: str or None, bool or None :rtype: str or None, bool or None
""" """
bundle_temp_filename = fetch_file(module=self.module, bundle_temp_filename = fetch_file(module=self.module,

View file

@ -393,7 +393,7 @@ class Homectl(object):
user_metadata.pop('status', None) user_metadata.pop('status', None)
# Let last change Usec be updated by homed when command runs. # Let last change Usec be updated by homed when command runs.
user_metadata.pop('lastChangeUSec', None) user_metadata.pop('lastChangeUSec', None)
# Now only change fields that are called on leaving whats currently in the record intact. # Now only change fields that are called on leaving what's currently in the record intact.
record = user_metadata record = user_metadata
record['userName'] = self.name record['userName'] = self.name

View file

@ -174,7 +174,7 @@ class Imgadm(object):
# There is no feedback from imgadm(1M) to determine if anything # There is no feedback from imgadm(1M) to determine if anything
# was actually changed. So treat this as an 'always-changes' operation. # was actually changed. So treat this as an 'always-changes' operation.
# Note that 'imgadm -v' produces unparseable JSON... # Note that 'imgadm -v' produces unparsable JSON...
self.changed = True self.changed = True
def manage_sources(self): def manage_sources(self):

View file

@ -799,7 +799,7 @@ class JIRA(StateModuleHelper):
if msg: if msg:
self.module.fail_json(msg=', '.join(msg)) self.module.fail_json(msg=', '.join(msg))
self.module.fail_json(msg=to_native(error)) self.module.fail_json(msg=to_native(error))
# Fallback print body, if it cant be decoded # Fallback print body, if it can't be decoded
self.module.fail_json(msg=to_native(info['body'])) self.module.fail_json(msg=to_native(info['body']))
body = response.read() body = response.read()

View file

@ -480,7 +480,7 @@ def main():
module.fail_json(msg="Failed to remove volume group %s" % (vg), rc=rc, err=err) module.fail_json(msg="Failed to remove volume group %s" % (vg), rc=rc, err=err)
else: else:
module.fail_json(msg="Refuse to remove non-empty volume group %s without force=true" % (vg)) module.fail_json(msg="Refuse to remove non-empty volume group %s without force=true" % (vg))
# activate/inactivate existing VG # activate/deactivate existing VG
elif state == 'active': elif state == 'active':
changed = activate_vg(module=module, vg=vg, active=True) changed = activate_vg(module=module, vg=vg, active=True)
elif state == 'inactive': elif state == 'inactive':

View file

@ -1277,7 +1277,7 @@ class LxcContainerManagement(object):
""" """
vg = self._get_lxc_vg() vg = self._get_lxc_vg()
free_space, messurement = self._get_vg_free_pe(vg_name=vg) free_space, measurement = self._get_vg_free_pe(vg_name=vg)
if free_space < float(snapshot_size_gb): if free_space < float(snapshot_size_gb):
message = ( message = (

View file

@ -46,8 +46,8 @@ options:
description: description:
- Zone name. - Zone name.
- A zone name must be unique name. - A zone name must be unique name.
- A zone name must begin with an alpha-numeric character. - A zone name must begin with an alphanumeric character.
- The name can contain alpha-numeric characters, underscores V(_), hyphens V(-), and periods V(.). - The name can contain alphanumeric characters, underscores V(_), hyphens V(-), and periods V(.).
- The name cannot be longer than 64 characters. - The name cannot be longer than 64 characters.
type: str type: str
required: true required: true

View file

@ -222,7 +222,7 @@ def main():
# OID style names are not supported # OID style names are not supported
if not re.match('^[a-zA-Z0-9_]+$', name): if not re.match('^[a-zA-Z0-9_]+$', name):
module.fail_json( module.fail_json(
msg="Name may only contain alpha-numeric and underscore characters" msg="Name may only contain alphanumeric and underscore characters"
) )
value = module.params.pop('value') value = module.params.pop('value')

View file

@ -53,7 +53,7 @@ options:
choices: [ local, UTC ] choices: [ local, UTC ]
notes: notes:
- On SmartOS the C(sm-set-timezone) utility (part of the smtools package) is required to set the zone timezone - On SmartOS the C(sm-set-timezone) utility (part of the smtools package) is required to set the zone timezone
- On AIX only Olson/tz database timezones are useable (POSIX is not supported). - On AIX only Olson/tz database timezones are usable (POSIX is not supported).
- An OS reboot is also required on AIX for the new timezone setting to take effect. - An OS reboot is also required on AIX for the new timezone setting to take effect.
author: author:
- Shinichi TAMURA (@tmshn) - Shinichi TAMURA (@tmshn)

View file

@ -90,7 +90,7 @@
size: -2G size: -2G
state: present state: present
- name: Resizing /mksysb to 100G (no enought space) - name: Resizing /mksysb to 100G (not enough space)
aix_filesystem: aix_filesystem:
filesystem: /mksysb filesystem: /mksysb
size: +100G size: +100G

View file

@ -73,7 +73,7 @@
state: absent state: absent
force: true force: true
- name: reenable autoindex - name: re-enable autoindex
community.general.apache2_module: community.general.apache2_module:
name: autoindex name: autoindex
state: present state: present

View file

@ -1,4 +1,4 @@
# Copyright (c) Ansible Projec # Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later

View file

@ -161,7 +161,7 @@
- result['role']['ServiceIdentities'][0]['ServiceName'] == "web" - result['role']['ServiceIdentities'][0]['ServiceName'] == "web"
- result['role']['ServiceIdentities'][0]['Datacenters'][0] == "dc1" - result['role']['ServiceIdentities'][0]['Datacenters'][0] == "dc1"
- result['role']['Policies'] is not defined - result['role']['Policies'] is not defined
- result['role']['NodeIdentities'] == [] # in check mode the cleared field is returned as an emtpy array - result['role']['NodeIdentities'] == [] # in check mode the cleared field is returned as an empty array
- name: Update the role with service identity to remove the service identities - name: Update the role with service identity to remove the service identities
consul_role: consul_role:

View file

@ -11,7 +11,7 @@ tested_filesystems:
# - XFS: 20Mo # - XFS: 20Mo
# - Btrfs: 150Mo (50Mo when "--metadata single" is used and 100Mb when on newer Fedora versions) # - Btrfs: 150Mo (50Mo when "--metadata single" is used and 100Mb when on newer Fedora versions)
# - f2fs: # - f2fs:
# - 1.2.0 requires at leat 116Mo # - 1.2.0 requires at least 116Mo
# - 1.7.0 requires at least 30Mo # - 1.7.0 requires at least 30Mo
# - 1.10.0 requires at least 38Mo # - 1.10.0 requires at least 38Mo
# - resizefs asserts when initial fs is smaller than 60Mo and seems to require 1.10.0 # - resizefs asserts when initial fs is smaller than 60Mo and seems to require 1.10.0

View file

@ -109,7 +109,7 @@
- current_gems.stdout is not search('gist\s+\([0-9.]+\)') - current_gems.stdout is not search('gist\s+\([0-9.]+\)')
when: ansible_user_uid == 0 when: ansible_user_uid == 0
# Check cutom gem directory # Check custom gem directory
- name: Install gem in a custom directory with incorrect options - name: Install gem in a custom directory with incorrect options
gem: gem:
name: gist name: gist

View file

@ -59,7 +59,7 @@
failed_when: customized_result.msg.find("does not exist") == -1 failed_when: customized_result.msg.find("does not exist") == -1
# Test: filenames with whitespaces # Test: filenames with whitespaces
# We report error: the user should be reponsible for the it # We report error: the user should be responsible for the it
- name: "Testcase: filenames with whitespaces" - name: "Testcase: filenames with whitespaces"
community.general.iso_customize: community.general.iso_customize:
src_iso: "{{ test_dir }}/test.iso" src_iso: "{{ test_dir }}/test.iso"

View file

@ -181,7 +181,7 @@
- result_x509_changed is changed - result_x509_changed is changed
- name: | - name: |
We also want to make sure that the status doesnt change if we import the same cert We also want to make sure that the status does not change if we import the same cert
community.general.java_cert: community.general.java_cert:
cert_alias: test_cert cert_alias: test_cert
cert_path: "{{ test_cert2_path }}" cert_path: "{{ test_cert2_path }}"

View file

@ -20,7 +20,7 @@ docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH=/auth -e KEYC
This test suite can run against a fresh unconfigured server instance This test suite can run against a fresh unconfigured server instance
(no preconfiguration required) and cleans up after itself (undoes all (no preconfiguration required) and cleans up after itself (undoes all
its config changes) as long as it runs through completly. While its active its config changes) as long as it runs through completely. While its active
it changes the server configuration in the following ways: it changes the server configuration in the following ways:
* creating, modifying and deleting some keycloak groups * creating, modifying and deleting some keycloak groups

View file

@ -20,7 +20,7 @@ docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH=/auth -e KEYC
This test suite can run against a fresh unconfigured server instance This test suite can run against a fresh unconfigured server instance
(no preconfiguration required) and cleans up after itself (undoes all (no preconfiguration required) and cleans up after itself (undoes all
its config changes) as long as it runs through completly. While its active its config changes) as long as it runs through completely. While its active
it changes the server configuration in the following ways: it changes the server configuration in the following ways:
* creating, modifying and deleting some keycloak groups * creating, modifying and deleting some keycloak groups

View file

@ -20,7 +20,7 @@ docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH=/auth -e KEYC
This test suite can run against a fresh unconfigured server instance This test suite can run against a fresh unconfigured server instance
(no preconfiguration required) and cleans up after itself (undoes all (no preconfiguration required) and cleans up after itself (undoes all
its config changes) as long as it runs through completly. While its active its config changes) as long as it runs through completely. While its active
it changes the server configuration in the following ways: it changes the server configuration in the following ways:
* creating, modifying and deleting some keycloak groups * creating, modifying and deleting some keycloak groups

View file

@ -20,7 +20,7 @@ docker run --name mykeycloak -p 8080:8080 -e KC_HTTP_RELATIVE_PATH=/auth -e KEYC
This test suite can run against a fresh unconfigured server instance This test suite can run against a fresh unconfigured server instance
(no preconfiguration required) and cleans up after itself (undoes all (no preconfiguration required) and cleans up after itself (undoes all
its config changes) as long as it runs through completly. While its active its config changes) as long as it runs through completely. While its active
it changes the server configuration in the following ways: it changes the server configuration in the following ways:
* creating, modifying and deleting some keycloak groups * creating, modifying and deleting some keycloak groups

View file

@ -140,7 +140,7 @@
that: that:
- "'active' == '{{ item }}'" - "'active' == '{{ item }}'"
- name: Deactive volume group in check mode - name: Deactivate volume group in check mode
lvg: lvg:
state: inactive state: inactive
vg: testvg vg: testvg

View file

@ -117,7 +117,7 @@
that: that:
- install_status.stat.exists == true - install_status.stat.exists == true
- name: Unistall Rested - name: Uninstall Rested
mas: mas:
id: 421879749 id: 421879749
state: absent state: absent

View file

@ -9,7 +9,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# ENVIRONENT PREPARACTION # ENVIRONMENT PREPARACTION
- set_fact: test_number= 0 - set_fact: test_number= 0

View file

@ -30,7 +30,7 @@
state: present state: present
notify: Remove packages for yay-become notify: Remove packages for yay-become
- name: Hack permssions for the remote_tmp_dir - name: Hack permissions for the remote_tmp_dir
ansible.builtin.file: ansible.builtin.file:
path: "{{ remote_tmp_dir }}" path: "{{ remote_tmp_dir }}"
mode: '0777' mode: '0777'

View file

@ -23,7 +23,7 @@
commercial_type: '{{ scaleway_commerial_type }}' commercial_type: '{{ scaleway_commerial_type }}'
wait: true wait: true
- name: Get server informations of the first page - name: Get server information of the first page
scaleway_server_info: scaleway_server_info:
region: par1 region: par1
query_parameters: query_parameters:
@ -37,7 +37,7 @@
that: that:
- first_page is success - first_page is success
- name: Get server informations of the second page - name: Get server information of the second page
scaleway_server_info: scaleway_server_info:
region: par1 region: par1
query_parameters: query_parameters:

View file

@ -159,7 +159,7 @@
- cr_deletion_task is success - cr_deletion_task is success
- cr_deletion_task is changed - cr_deletion_task is changed
- name: Delete container regitry (Confirmation) - name: Delete container registry (Confirmation)
community.general.scaleway_container_registry: community.general.scaleway_container_registry:
state: absent state: absent
name: '{{ name }}' name: '{{ name }}'

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get image informations and register it in a variable - name: Get image information and register it in a variable
scaleway_image_info: scaleway_image_info:
region: par1 region: par1
register: images register: images
@ -22,7 +22,7 @@
that: that:
- images is success - images is success
- name: Get image informations from ams1 and register it in a variable - name: Get image information from ams1 and register it in a variable
scaleway_image_info: scaleway_image_info:
region: ams1 region: ams1
register: images_ams1 register: images_ams1

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get ip informations and register it in a variable - name: Get ip information and register it in a variable
scaleway_ip_info: scaleway_ip_info:
region: par1 region: par1
register: ips register: ips
@ -22,7 +22,7 @@
that: that:
- ips is success - ips is success
- name: Get ip informations and register it in a variable - name: Get ip information and register it in a variable
scaleway_ip_info: scaleway_ip_info:
region: ams1 region: ams1
register: ips_ams1 register: ips_ams1

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get organization informations and register it in a variable - name: Get organization information and register it in a variable
scaleway_organization_info: scaleway_organization_info:
register: organizations register: organizations

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get security group informations and register it in a variable - name: Get security group information and register it in a variable
scaleway_security_group_info: scaleway_security_group_info:
region: par1 region: par1
register: security_groups register: security_groups
@ -22,7 +22,7 @@
that: that:
- security_groups is success - security_groups is success
- name: Get security group informations and register it in a variable (AMS1) - name: Get security group information and register it in a variable (AMS1)
scaleway_security_group_info: scaleway_security_group_info:
region: ams1 region: ams1
register: ams1_security_groups register: ams1_security_groups

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get server informations and register it in a variable - name: Get server information and register it in a variable
scaleway_server_info: scaleway_server_info:
region: par1 region: par1
register: servers register: servers
@ -22,7 +22,7 @@
that: that:
- servers is success - servers is success
- name: Get server informations and register it in a variable - name: Get server information and register it in a variable
scaleway_server_info: scaleway_server_info:
region: ams1 region: ams1
register: ams1_servers register: ams1_servers

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get snapshot informations and register it in a variable - name: Get snapshot information and register it in a variable
scaleway_snapshot_info: scaleway_snapshot_info:
region: par1 region: par1
register: snapshots register: snapshots
@ -22,7 +22,7 @@
that: that:
- snapshots is success - snapshots is success
- name: Get snapshot informations and register it in a variable (AMS1) - name: Get snapshot information and register it in a variable (AMS1)
scaleway_snapshot_info: scaleway_snapshot_info:
region: ams1 region: ams1
register: ams1_snapshots register: ams1_snapshots

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: Get volume informations and register it in a variable - name: Get volume information and register it in a variable
scaleway_volume_info: scaleway_volume_info:
region: par1 region: par1
register: volumes register: volumes
@ -22,7 +22,7 @@
that: that:
- volumes is success - volumes is success
- name: Get volume informations and register it in a variable (AMS1) - name: Get volume information and register it in a variable (AMS1)
scaleway_volume_info: scaleway_volume_info:
region: ams1 region: ams1
register: ams1_volumes register: ams1_volumes

View file

@ -50,7 +50,7 @@
state: present state: present
# Check if re-installing etcd3 is required # Check if re-installing etcd3 is required
- name: Check if etcd3ctl exists for re-use. - name: Check if etcd3ctl exists for reuse.
shell: "ETCDCTL_API=3 {{ etcd3_path }}/etcdctl --endpoints=localhost:2379 get foo" shell: "ETCDCTL_API=3 {{ etcd3_path }}/etcdctl --endpoints=localhost:2379 get foo"
args: args:
executable: /bin/bash executable: /bin/bash

View file

@ -33,7 +33,7 @@
src: "{{ ssh_config_test }}" src: "{{ ssh_config_test }}"
register: slurp_ssh_config register: slurp_ssh_config
- name: "Options - Verify that nothign was added to {{ ssh_config_test }} during change mode" - name: "Options - Verify that nothing was added to {{ ssh_config_test }} during change mode"
assert: assert:
that: that:
- "'options.example.com' not in slurp_ssh_config['content'] | b64decode" - "'options.example.com' not in slurp_ssh_config['content'] | b64decode"
@ -243,7 +243,7 @@
src: "{{ ssh_config_test }}" src: "{{ ssh_config_test }}"
register: slurp_ssh_config register: slurp_ssh_config
- name: "Options - Verify that nothign was added to {{ ssh_config_test }} during change mode" - name: "Options - Verify that nothing was added to {{ ssh_config_test }} during change mode"
assert: assert:
that: that:
- "'options.example.com' not in slurp_ssh_config['content'] | b64decode" - "'options.example.com' not in slurp_ssh_config['content'] | b64decode"

View file

@ -63,5 +63,5 @@
loop_control: loop_control:
index_var: provider_index index_var: provider_index
- name: Test Complex Varibles - name: Test Complex Variables
ansible.builtin.include_tasks: complex_variables.yml ansible.builtin.include_tasks: complex_variables.yml

View file

@ -12,7 +12,7 @@ from ansible.plugins.loader import become_loader, get_shell_plugin
def call_become_plugin(task, var_options, cmd, executable=None): def call_become_plugin(task, var_options, cmd, executable=None):
"""Helper function to call become plugin simiarly on how Ansible itself handles this.""" """Helper function to call become plugin similarly on how Ansible itself handles this."""
plugin = become_loader.get(task['become_method']) plugin = become_loader.get(task['become_method'])
plugin.set_options(task_keys=task, var_options=var_options) plugin.set_options(task_keys=task, var_options=var_options)
shell = get_shell_plugin(executable=executable) shell = get_shell_plugin(executable=executable)

View file

@ -78,6 +78,6 @@ class TestLookupModule(unittest.TestCase):
@patch('ansible_collections.community.general.plugins.lookup.bitwarden_secrets_manager._bitwarden_secrets_manager', new=MockBitwardenSecretsManager()) @patch('ansible_collections.community.general.plugins.lookup.bitwarden_secrets_manager._bitwarden_secrets_manager', new=MockBitwardenSecretsManager())
def test_bitwarden_secrets_manager_no_match(self): def test_bitwarden_secrets_manager_no_match(self):
# Getting a nonexistant secret id throws exception # Getting a nonexistent secret id throws exception
with self.assertRaises(AnsibleLookupError): with self.assertRaises(AnsibleLookupError):
self.lookup.run(['nonexistant_id'], bws_access_token='123') self.lookup.run(['nonexistant_id'], bws_access_token='123')

View file

@ -89,7 +89,7 @@ class TestDNSimple_Info(ModuleTestCase):
result = exc_info.exception.args[0] result = exc_info.exception.args[0]
# nothing should change # nothing should change
self.assertFalse(result['changed']) self.assertFalse(result['changed'])
# we should return at least one item with mathing domain # we should return at least one item with matching domain
assert result['dnsimple_records_info'][0]['name'] == name assert result['dnsimple_records_info'][0]['name'] == name
@with_httmock(records_resp) @with_httmock(records_resp)

View file

@ -69,7 +69,7 @@ class TestGem(ModuleTestCase):
assert result['msg'] == "install_dir requires user_install=false" assert result['msg'] == "install_dir requires user_install=false"
def test_passes_install_dir_to_gem(self): def test_passes_install_dir_to_gem(self):
# XXX: This test is extremely fragile, and makes assuptions about the module code, and how # XXX: This test is extremely fragile, and makes assumptions about the module code, and how
# functions are run. # functions are run.
# If you start modifying the code of the module, you might need to modify what this # If you start modifying the code of the module, you might need to modify what this
# test mocks. The only thing that matters is the assertion that this 'gem install' is # test mocks. The only thing that matters is the assertion that this 'gem install' is

View file

@ -152,7 +152,7 @@ class TestUnloadModule(ModuleTestCase):
class TestModuleIsLoadedPersistently(ModuleTestCase): class TestModuleIsLoadedPersistently(ModuleTestCase):
def setUp(self): def setUp(self):
if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7): if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7):
self.skipTest('open_mock doesnt support readline in earlier python versions') self.skipTest("open_mock doesn't support readline in earlier python versions")
super(TestModuleIsLoadedPersistently, self).setUp() super(TestModuleIsLoadedPersistently, self).setUp()
@ -230,7 +230,7 @@ class TestModuleIsLoadedPersistently(ModuleTestCase):
class TestPermanentParams(ModuleTestCase): class TestPermanentParams(ModuleTestCase):
def setUp(self): def setUp(self):
if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7): if (sys.version_info[0] == 3 and sys.version_info[1] < 7) or (sys.version_info[0] == 2 and sys.version_info[1] < 7):
self.skipTest('open_mock doesnt support readline in earlier python versions') self.skipTest("open_mock doesn't support readline in earlier python versions")
super(TestPermanentParams, self).setUp() super(TestPermanentParams, self).setUp()
self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path') self.mock_get_bin_path = patch('ansible.module_utils.basic.AnsibleModule.get_bin_path')

View file

@ -54,9 +54,9 @@ class PagerDutyTest(unittest.TestCase):
def _assert_create_window_payload(self, module, url, headers, data=None, method=None): def _assert_create_window_payload(self, module, url, headers, data=None, method=None):
payload = json.loads(data) payload = json.loads(data)
window_data = payload['maintenance_window'] window_data = payload['maintenance_window']
self.assertTrue('start_time' in window_data, '"start_time" is requiered attribute') self.assertTrue('start_time' in window_data, '"start_time" is required attribute')
self.assertTrue('end_time' in window_data, '"end_time" is requiered attribute') self.assertTrue('end_time' in window_data, '"end_time" is required attribute')
self.assertTrue('services' in window_data, '"services" is requiered attribute') self.assertTrue('services' in window_data, '"services" is required attribute')
return object(), {'status': 201} return object(), {'status': 201}
def _assert_create_window_single_service(self, module, url, headers, data=None, method=None): def _assert_create_window_single_service(self, module, url, headers, data=None, method=None):

View file

@ -89,7 +89,7 @@ Enabled: %s
Enable the specified IDs. Enable the specified IDs.
'repo_ids' can be either a string or a list of strings representing 'repo_ids' can be either a string or a list of strings representing
an ID (wilcard included). an ID (wildcard included).
Returns the same object, so calls to this can be chained. Returns the same object, so calls to this can be chained.
""" """
@ -104,7 +104,7 @@ Enabled: %s
Disable the specified IDs. Disable the specified IDs.
'repo_ids' can be either a string or a list of strings representing 'repo_ids' can be either a string or a list of strings representing
an ID (wilcard included). an ID (wildcard included).
Returns the same object, so calls to this can be chained. Returns the same object, so calls to this can be chained.
""" """