fix typos in storage modules (#62333)

(cherry picked from commit f44bfccb56)
pull/62386/head
Andrey Klychkov 5 years ago committed by Toshio Kuratomi
parent e9a16d381d
commit e4965be9af

@ -112,7 +112,7 @@ def get_filesystem(module, system):
@api_wrapper
def get_export(module, filesystem, system):
"""Retrun export if found. When not found return None"""
"""Return export if found. When not found return None"""
export = None
exports_to_list = system.exports.to_list()

@ -103,7 +103,7 @@ def transform(d):
@api_wrapper
def get_export(module, system):
"""Retrun export if found. Fail module if not found"""
"""Return export if found. Fail module if not found"""
try:
export = system.exports.get(export_path=module.params['export'])

@ -119,7 +119,7 @@ def create_pool(module, system):
pool = system.pools.create(name=name, physical_capacity=Capacity('1TB'), virtual_capacity=Capacity(vsize))
else:
pool = system.pools.create(name=name, physical_capacity=Capacity(size), virtual_capacity=Capacity(vsize))
# Default value of ssd_cache is True. Disable ssd chacing if False
# Default value of ssd_cache is True. Disable ssd caching if False
if not ssd_cache:
pool.update_ssd_enabled(ssd_cache)

@ -321,7 +321,7 @@ class ElementSWAccessGroup(object):
self.delete_access_group()
changed = True
else:
# If state - present, check for any parameter of exising group needs modification.
# If state - present, check for any parameter of existing group needs modification.
if self.volumes is not None and len(self.volumes) > 0:
# Compare the volume list
if not group_detail.volumes:

@ -269,7 +269,7 @@ class ElementSWAccount(object):
if self.state == 'absent':
changed = True
else:
# If state - present, check for any parameter of exising account needs modification.
# If state - present, check for any parameter of existing account needs modification.
if account_detail.username is not None and self.element_username is not None and \
account_detail.username != self.element_username:
update_account = True

@ -164,7 +164,7 @@ class ElementSWClusterConfig(object):
return ntp_details
def cmp(self, provided_ntp_servers, existing_ntp_servers):
# As python3 doesn't have default cmp function, defining manually to provide same fuctionality.
# As python3 doesn't have default cmp function, defining manually to provide same functionality.
return (provided_ntp_servers > existing_ntp_servers) - (provided_ntp_servers < existing_ntp_servers)
def get_cluster_details(self):

@ -202,7 +202,7 @@ class ElementSWSnapShotSchedule(object):
def __init__(self):
"""
Parse arguments, setup state variables,
check paramenters and ensure SDK is installed
check parameters and ensure SDK is installed
"""
self.argument_spec = netapp_utils.ontap_sf_host_argument_spec()
self.argument_spec.update(dict(

@ -162,7 +162,7 @@ class ElementOSVolume(object):
def __init__(self):
"""
Parse arguments, setup state variables,
check paramenters and ensure SDK is installed
check parameters and ensure SDK is installed
"""
self._size_unit_map = netapp_utils.SF_BYTE_MAP

@ -118,7 +118,7 @@ class ElementOSVolumeClone(object):
def __init__(self):
"""
Parse arguments, setup state variables,
check paramenters and ensure SDK is installed
check parameters and ensure SDK is installed
"""
self._size_unit_map = netapp_utils.SF_BYTE_MAP

@ -115,7 +115,7 @@ class NetAppONTAPCGSnapshot(object):
"""
This is duplicated from na_ontap_snapshot
Checks to see if a snapshot exists or not
:return: Return True if a snapshot exists, false if it dosn't
:return: Return True if a snapshot exists, false if it doesn't
"""
# TODO: Remove this method and import snapshot module and
# call get after re-factoring __init__ across all the modules

@ -247,7 +247,7 @@ class NetAppONTAPCifsShare(object):
def modify_cifs_share(self):
"""
modilfy path for the given CIFS share
modify path for the given CIFS share
"""
options = {'share-name': self.parameters.get('share_name')}
cifs_modify = netapp_utils.zapi.NaElement.create_node_with_children(

@ -33,7 +33,7 @@ options:
version_added: "2.8"
return_dict:
description:
- returns a parsesable dictonary instead of raw XML output
- returns a parsesable dictionary instead of raw XML output
type: bool
default: false
version_added: "2.9"
@ -150,7 +150,7 @@ class NetAppONTAPCommand(object):
self.module.exit_json(changed=changed, msg=output)
def parse_xml_to_dict(self, xmldata):
'''Parse raw XML from system-cli and create an Ansible parseable dictonary'''
'''Parse raw XML from system-cli and create an Ansible parseable dictionary'''
xml_import_ok = True
xml_parse_ok = True
@ -197,7 +197,7 @@ class NetAppONTAPCommand(object):
self.result_dict['xml_dict']['last_element'] = ""
def _char_data(self, data):
''' Dump XML elemet data '''
''' Dump XML element data '''
self.result_dict['xml_dict'][str(self.result_dict['xml_dict']['active_element'])]['data'] = repr(data)
def _end_element(self, name):

@ -126,7 +126,7 @@ class NetAppOntapFCP(object):
try:
self.server.invoke_successfully(netapp_utils.zapi.NaElement('fcp-service-stop'), True)
except netapp_utils.zapi.NaApiError as error:
self.module.fail_json(msg='Error Stoping FCP %s' %
self.module.fail_json(msg='Error Stopping FCP %s' %
(to_native(error)),
exception=traceback.format_exc())

@ -77,7 +77,7 @@ EXAMPLES = """
username: "{{ netapp username }}"
password: "{{ netapp password }}"
- name: Destory firewall Policy
- name: Destroy firewall Policy
na_ontap_firewall_policy:
state: absent
policy: pizza

@ -58,7 +58,7 @@ options:
description:
- List of initiators to be mapped to the igroup.
- WWPN, WWPN Alias, or iSCSI name of Initiator to add or remove.
- For a modify operation, this list replaces the exisiting initiators
- For a modify operation, this list replaces the existing initiators
- This module does not add or remove specific initiator(s) in an igroup
aliases:
- initiator
@ -117,7 +117,7 @@ EXAMPLES = '''
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify Igroup Initiators (replaces exisiting initiators)
- name: Modify Igroup Initiators (replaces existing initiators)
na_ontap_igroup:
state: present
name: ansibleIgroup3

@ -194,7 +194,7 @@ class NetAppONTAPJob(object):
def add_job_details(self, na_element_object, values):
"""
Add children node for create or modify NaElement object
:param na_element_object: modif or create NaElement object
:param na_element_object: modify or create NaElement object
:param values: dictionary of cron values to be added
:return: None
"""

@ -85,7 +85,7 @@ options:
admin_server_port:
description:
- The TCP port on the Kerberos administration server where the Kerberos administration service is running.
- The default for this parmater is '749'
- The default for this parameter is '749'
type: str
pw_server_ip:

@ -48,7 +48,7 @@ options:
ldap_servers:
description:
- Comma separated list of LDAP servers. FQDN's or IP addreses
- Comma separated list of LDAP servers. FQDN's or IP addresses
- Required if I(state=present).
type: list

@ -210,7 +210,7 @@ class NetAppOntapLUNMap(object):
if result.get_child_by_name('num-records') and int(result.get_child_content('num-records')) >= 1:
lun = result.get_child_by_name('attributes-list').get_child_by_name('lun-info')
# extract and assign lun infomation to return value
# extract and assign lun information to return value
hexlify = codecs.getencoder('hex')
naa_hex = to_text(hexlify(to_bytes(lun.get_child_content('serial-number')))[0])
return_value = {

@ -121,7 +121,7 @@ class NetAppOntapVlan(object):
def does_vlan_exist(self):
"""
Checks to see if a vlan already exists or not
:return: Returns True if the vlan exists, false if it dosn't
:return: Returns True if the vlan exists, false if it doesn't
"""
vlan_obj = netapp_utils.zapi.NaElement("net-vlan-get")
vlan_obj.add_new_child("interface-name", self.interface_name)

@ -29,7 +29,7 @@ options:
default: present
service_state:
description:
- Whether the specified NFS should be enabled or disabled. Creates NFS service if doesnt exist.
- Whether the specified NFS should be enabled or disabled. Creates NFS service if does not exist.
choices: ['started', 'stopped']
vserver:
description:

@ -127,8 +127,8 @@ EXAMPLES = """
username: "{{ destination_cluster_username }}"
password: "{{ destination_cluster_password }}"
# existing snapmirror relation with status 'snapmirrored' will be initiailzed
- name: Inititalize ONTAP/ONTAP SnapMirror
# existing snapmirror relation with status 'snapmirrored' will be initialized
- name: Initialize ONTAP/ONTAP SnapMirror
na_ontap_snapmirror:
state: present
source_path: 'ansible:test'

@ -268,7 +268,7 @@ class NetAppOntapSnapshot(object):
def rename_snapshot(self):
"""
Rename the sanpshot
Rename the snapshot
"""
snapshot_obj = netapp_utils.zapi.NaElement("snapshot-rename")

@ -364,7 +364,7 @@ EXAMPLES = """
snapshot_policy: default
time_out: 0
- name: Create flexGroup volume auto provsion as flex group
- name: Create flexGroup volume auto provision as flex group
na_ontap_volume:
state: present
name: ansibleVolume

@ -80,7 +80,7 @@ options:
shrink_threshold_percent:
description:
- Specifies the percentage of the flexible volume's capacity at which autoshrink is initiated.
- The default shrink theshold is 50%. It is an error for the shrink threshold to be greater than or equal to the grow threshold.
- The default shrink threshold is 50%. It is an error for the shrink threshold to be greater than or equal to the grow threshold.
- Range between 0 and 100
type: int
'''
@ -283,7 +283,7 @@ class NetAppOntapVolumeAutosize(object):
def modify_to_kb(self, converted_parameters):
"""
Save a coverted parameter
Save a converted parameter
:param converted_parameters: Dic of all parameters
:return:
"""

@ -79,7 +79,7 @@ options:
request_timeout:
description:
- Total request-service time-limit in seconds. If the virus-scanner does not respond within the provided time, scan will be timedout.
- Total request-service time-limit in seconds. If the virus-scanner does not respond within the provided time, scan will be timed out.
scan_files_with_no_ext:
description:

@ -151,7 +151,7 @@ class NetAppOntapVscanScannerPool(object):
try:
self.server.invoke_successfully(apply_policy_obj, True)
except netapp_utils.zapi.NaApiError as error:
self.module.fail_json(msg='Error appling policy %s to pool %s: %s' %
self.module.fail_json(msg='Error applying policy %s to pool %s: %s' %
(self.scanner_policy, self.scanner_pool, to_native(error)),
exception=traceback.format_exc())

@ -29,7 +29,7 @@ options:
required: yes
secondaryArrayId:
description:
- The ID of the secondary array to be used in mirroing process
- The ID of the secondary array to be used in mirroring process
required: yes
syncIntervalMinutes:
description:

@ -142,7 +142,7 @@ id:
ssid:
description:
- the unique identifer of the E-Series storage-system with the current api
- the unique identifier of the E-Series storage-system with the current api
returned: on success
type: str
sample: 1
@ -150,7 +150,7 @@ ssid:
api_url:
description:
- the url of the API that this request was proccessed by
- the url of the API that this request was processed by
returned: on success
type: str
sample: https://webservices.example.com:8443

@ -78,7 +78,7 @@ options:
storage-system.
- For example, all users in group A will be assigned all 4 available roles, which will allow access
to all the management functionality of the system (super-user). Those in group B only have the
storage.monitor role, which will allow only read-only acess.
storage.monitor role, which will allow only read-only access.
- This is specified as a mapping of regular expressions to a list of roles. See the examples.
- The roles that will be assigned to to the group/groups matching the provided regex.
- storage.admin allows users full read/write access to storage objects and operations.
@ -252,7 +252,7 @@ class Ldap(object):
return domain
def is_embedded(self):
"""Determine whether or not we're using the embedded or proxy implemenation of Web Services"""
"""Determine whether or not we're using the embedded or proxy implementation of Web Services"""
if self.embedded is None:
url = self.url
try:

@ -69,7 +69,7 @@ RETURN = """
returned: always
sample: "Created snapshot image"
image_id:
description: ID of snaphot image
description: ID of snapshot image
type: str
returned: state == created
sample: "3400000060080E5000299B640063074057BC5C5E "

@ -285,7 +285,7 @@ def main():
module.fail_json(msg="Failed to remove storage array. Id[%s]. Error[%s]." % (ssid, to_native(err)))
if rc == 422:
module.exit_json(changed=changed, msg="Storage system was not presnt.")
module.exit_json(changed=changed, msg="Storage system was not presented.")
if rc == 204:
module.exit_json(changed=changed, msg="Storage system removed.")

@ -272,7 +272,7 @@ class NetAppESeriesStoragePool(NetAppESeriesModule):
@property
def expandable_drive_count(self):
"""Maximum number of drives that a storage pool can be expended at a given time."""
"""Maximum number of drives that a storage pool can be expanded at a given time."""
capabilities = None
if self.raid_level == "raidDiskPool":
return len(self.available_drives)

@ -25,7 +25,7 @@ description:
Purity//FA operating system. By default, the module will collect basic
fact information including hosts, host groups, protection
groups and volume counts. Additional fact information can be collected
based on the configured set of arguements.
based on the configured set of arguments.
author:
- Pure Storage ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:
@ -419,7 +419,7 @@ def generate_config_dict(array):
config_facts['dns'] = array.get_dns()
# SMTP
config_facts['smtp'] = array.list_alert_recipients()
# SMNP
# SNMP
config_facts['snmp'] = array.list_snmp_managers()
config_facts['snmp_v3_engine_id'] = array.get_snmp_engine_id()['engine_id']
# DS

@ -26,7 +26,7 @@ description:
Purity//FB operating system. By default, the module will collect basic
fact information including hosts, host groups, protection
groups and volume counts. Additional fact information can be collected
based on the configured set of arguements.
based on the configured set of arguments.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -150,7 +150,7 @@ def main():
try:
emails = array.list_alert_recipients()
except Exception:
module.fail_json(msg='Failed to get exisitng email list')
module.fail_json(msg='Failed to get existing email list')
for email in range(0, len(emails)):
if emails[email]['name'] == module.params['address']:
exists = True

@ -54,7 +54,7 @@ from ansible.module_utils.pure import get_system, purefa_argument_spec
def update_name(module, array):
"""Change aray name"""
"""Change array name"""
changed = False
try:

@ -30,7 +30,7 @@ options:
choices: [ absent, present ]
domain:
description:
- Domain suffix to be appended when perofrming DNS lookups.
- Domain suffix to be appended when performing DNS lookups.
type: str
nameservers:
description:
@ -42,7 +42,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng DNS settings
- name: Delete existing DNS settings
purefa_dns:
state: absent
fa_url: 10.10.10.2
@ -85,7 +85,7 @@ def delete_dns(module, array):
array.set_dns(domain='', nameservers=[])
changed = True
except Exception:
module.fail_json(msg='Delete DNS settigs failed')
module.fail_json(msg='Delete DNS settings failed')
module.exit_json(changed=changed)

@ -21,7 +21,7 @@ description:
to SSL certificates at this time. Use the FlashArray GUI for this
additional configuration work.
- To modify an existing directory service configuration you must first delete
an exisitng configuration and then recreate with new settings.
an existing configuration and then recreate with new settings.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -55,7 +55,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng array_admin directory service role
- name: Delete existing array_admin directory service role
purefa_dsrole:
role: array_admin
state: absent

@ -17,7 +17,7 @@ module: purefa_hg
version_added: '2.4'
short_description: Manage hostgroups on Pure Storage FlashArrays
description:
- Create, delete or modifiy hostgroups on Pure Storage FlashArrays.
- Create, delete or modify hostgroups on Pure Storage FlashArrays.
author:
- Pure Storage ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -21,7 +21,7 @@ description:
Purity//FA operating system. By default, the module will collect basic
information including hosts, host groups, protection
groups and volume counts. Additional information can be collected
based on the configured set of arguements.
based on the configured set of arguments.
author:
- Pure Storage ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:
@ -489,7 +489,7 @@ def generate_config_dict(array):
config_info['dns'] = array.get_dns()
# SMTP
config_info['smtp'] = array.list_alert_recipients()
# SMNP
# SNMP
config_info['snmp'] = array.list_snmp_managers()
config_info['snmp_v3_engine_id'] = array.get_snmp_engine_id()['engine_id']
# DS

@ -41,7 +41,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng NTP server entries
- name: Delete existing NTP server entries
purefa_ntp:
state: absent
fa_url: 10.10.10.2

@ -50,7 +50,7 @@ options:
type: str
options:
description:
- Additonal mount options for the NFS share
- Additional mount options for the NFS share
- Supported mount options include I(port), I(rsize),
I(wsize), I(nfsvers), and I(tcp) or I(udp)
required: false
@ -133,7 +133,7 @@ def get_target(module, array):
def create_offload(module, array):
"""Create offload target"""
changed = False
# First check if the offload network inteface is there and enabled
# First check if the offload network interface is there and enabled
try:
if not array.get_network_interface('@offload.data')['enabled']:
module.fail_json(msg='Offload Network interface not enabled. Please resolve.')

@ -63,8 +63,8 @@ options:
to connect to.
- Note that all replicated protection groups are asynchronous.
- Target arrays or offload targets must already be connected to the source array.
- Maximum number of targets per Portection Group is 4, assuming your
configuration suppors this.
- Maximum number of targets per Protection Group is 4, assuming your
configuration supports this.
type: list
version_added: '2.8'
extends_documentation_fragment:

@ -61,7 +61,7 @@ options:
type: str
version_added: 2.8
now:
description: Whether to initiate a snapshot of the protection group immeadiately
description: Whether to initiate a snapshot of the protection group immediately
type: bool
default: False
version_added: 2.9

@ -17,7 +17,7 @@ module: purefa_phonehome
version_added: '2.9'
short_description: Enable or Disable Pure Storage FlashArray Phonehome
description:
- Enablke or Disable Phonehome for a Pure Storage FlashArray.
- Enable or Disable Phonehome for a Pure Storage FlashArray.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -17,7 +17,7 @@ module: purefa_ra
version_added: '2.8'
short_description: Enable or Disable Pure Storage FlashArray Remote Assist
description:
- Enablke or Disable Remote Assist for a Pure Storage FlashArray.
- Enable or Disable Remote Assist for a Pure Storage FlashArray.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -21,7 +21,7 @@ short_description: Configure FlashArray SMTP settings
description:
- Set or erase configuration for the SMTP settings.
- If username/password are set this will always force a change as there is
no way to see if the password is differnet from the current SMTP configuration.
no way to see if the password is different from the current SMTP configuration.
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:
state:
@ -51,7 +51,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng SMTP settings
- name: Delete existing SMTP settings
purefa_smtp:
state: absent
fa_url: 10.10.10.2
@ -81,7 +81,7 @@ def delete_smtp(module, array):
try:
array.set_smtp(sender_domain='', username='', password='', relay_host='')
except Exception:
module.fail_json(msg='Delete SMTP settigs failed')
module.fail_json(msg='Delete SMTP settings failed')
module.exit_json(changed=changed)

@ -86,7 +86,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng SNMP manager
- name: Delete existing SNMP manager
purefa_snmp:
name: manager1
state: absent

@ -53,7 +53,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Delete exisitng syslog server entries
- name: Delete existing syslog server entries
purefa_syslog:
address: syslog1.com
protocol: tcp

@ -17,7 +17,7 @@ module: purefa_user
version_added: '2.8'
short_description: Create, modify or delete FlashArray local user account
description:
- Create, modify or delete local users on a Pure Stoage FlashArray.
- Create, modify or delete local users on a Pure Storage FlashArray.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -42,7 +42,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Create new volune group
- name: Create new volume group
purefa_vg:
vgroup: foo
fa_url: 10.10.10.2
@ -55,7 +55,7 @@ EXAMPLES = r'''
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Recover deleted volune group
- name: Recover deleted volume group
purefa_vg:
vgroup: foo
fa_url: 10.10.10.2

@ -43,7 +43,7 @@ options:
default: 'no'
overwrite:
description:
- Define whether to overwrite a target volume if it already exisits.
- Define whether to overwrite a target volume if it already exists.
type: bool
default: 'no'
size:

@ -21,7 +21,7 @@ description:
to SSL certificates at this time. Use the FlashBlade GUI for this
additional configuration work.
- To modify an existing directory service configuration you must first delete
an exisitng configuration and then recreate with new settings.
an existing configuration and then recreate with new settings.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -22,7 +22,7 @@ description:
Purity//FB operating system. By default, the module will collect basic
information including hosts, host groups, protection
groups and volume counts. Additional information can be collected
based on the configured set of arguements.
based on the configured set of arguments.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -17,7 +17,7 @@ module: purefb_ra
version_added: '2.9'
short_description: Enable or Disable Pure Storage FlashBlade Remote Assist
description:
- Enablke or Disable Remote Assist for a Pure Storage FlashBlade.
- Enable or Disable Remote Assist for a Pure Storage FlashBlade.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:

@ -17,7 +17,7 @@ module: purefb_s3acc
version_added: '2.8'
short_description: Create or delete FlashBlade Object Store accounts
description:
- Create or delete object store accounts on a Pure Stoage FlashBlade.
- Create or delete object store accounts on a Pure Storage FlashBlade.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:
@ -36,7 +36,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Crrate object store account foo
- name: Create object store account foo
purefb_s3acc:
name: foo
fb_url: 10.10.10.2

@ -17,7 +17,7 @@ module: purefb_s3user
version_added: '2.8'
short_description: Create or delete FlashBlade Object Store account users
description:
- Create or delete object store account users on a Pure Stoage FlashBlade.
- Create or delete object store account users on a Pure Storage FlashBlade.
author:
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
options:
@ -46,7 +46,7 @@ extends_documentation_fragment:
'''
EXAMPLES = r'''
- name: Crrate object store user (with access ID and key) foo in account bar
- name: Create object store user (with access ID and key) foo in account bar
purefb_s3user:
name: foo
account: bar

@ -53,7 +53,7 @@ options:
default: all
depth:
description:
- Specifiies recurion depth.
- Specifies recursion depth.
'''
EXAMPLES = '''

Loading…
Cancel
Save