diff --git a/ansible_collections/netapp/elementsw/README.md b/ansible_collections/netapp/elementsw/README.md index cf5ab644..ae3b21e8 100644 --- a/ansible_collections/netapp/elementsw/README.md +++ b/ansible_collections/netapp/elementsw/README.md @@ -27,6 +27,9 @@ Join our Slack Channel at [Netapp.io](http://netapp.io/slack) ### Module documentation changes - use a three group format for `version_added`. So 2.7 becomes 2.7.0. Same thing for 2.8 and 2.9. +- add type: str (or int, dict) where missing in documentation section. +- add required: true where missing. +- remove required: true for state and use present as default. ## 20.6.0 ### Bug Fixes diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group.py index 9cbf6ce5..bf299ac9 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group.py @@ -34,14 +34,16 @@ state: description: - Whether the specified access group should exist or not. - required: true choices: ['present', 'absent'] + default: present + type: str from_name: description: - ID or Name of the access group to rename. - Required to create a new access group called 'name' by renaming 'from_name'. version_added: 2.8.0 + type: str name: description: @@ -49,6 +51,7 @@ required: True aliases: - src_access_group_id + type: str initiators: description: @@ -70,10 +73,12 @@ - if account_id is digit, it will consider as account_id - If account_id is string, it will consider as account_name version_added: 2.8.0 + type: str virtual_network_id: description: - The ID of the Element SW Software Cluster Virtual Network to associate the access group with. + type: int virtual_network_tags: description: @@ -83,6 +88,7 @@ attributes: description: List of Name/Value pairs in JSON object format. + type: dict ''' @@ -157,7 +163,7 @@ def __init__(self): self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), from_name=dict(required=False, type='str'), name=dict(required=True, aliases=["src_access_group_id"], type='str'), initiators=dict(required=False, type='list', elements='str'), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group_volumes.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group_volumes.py index 4764b21c..8fa0eecd 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group_volumes.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_access_group_volumes.py @@ -34,14 +34,14 @@ state: description: - Whether the specified volumes should exist or not for this access group. - required: true choices: ['present', 'absent'] + default: present type: str access_group: description: - Name or id for the access group to add volumes to, or remove volumes from - required: True + required: true type: str volumes: @@ -58,6 +58,7 @@ - It accepts either account_name or account_id - if account_id is numeric, look up for account_id first, then look up for account_name - If account_id is not numeric, look up for account_name + required: true type: str ''' @@ -115,7 +116,7 @@ def __init__(self): self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), access_group=dict(required=True, type='str'), volumes=dict(required=True, type='list', elements='str'), account_id=dict(required=True, type='str'), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_account.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_account.py index 1f4e65b2..ae2b7704 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_account.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_account.py @@ -33,8 +33,9 @@ state: description: - Whether the specified account should exist or not. - required: true choices: ['present', 'absent'] + default: present + type: str element_username: description: @@ -42,6 +43,7 @@ required: true aliases: - account_id + type: str from_name: description: @@ -54,6 +56,7 @@ - CHAP secret to use for the initiator. Should be 12-16 characters long and impenetrable. - The CHAP initiator secrets must be unique and cannot be the same as the target CHAP secret. - If not specified, a random secret is created. + type: str target_secret: description: @@ -61,13 +64,16 @@ - Should be 12-16 characters long and impenetrable. - The CHAP target secrets must be unique and cannot be the same as the initiator CHAP secret. - If not specified, a random secret is created. + type: str attributes: description: List of Name/Value pairs in JSON object format. + type: dict status: description: - Status of the account. + type: str ''' @@ -139,11 +145,11 @@ class ElementSWAccount(object): def __init__(self): self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), element_username=dict(required=True, aliases=["account_id"], type='str'), from_name=dict(required=False, default=None), - initiator_secret=dict(required=False, type='str'), - target_secret=dict(required=False, type='str'), + initiator_secret=dict(required=False, type='str', no_log=True), + target_secret=dict(required=False, type='str', no_log=True), attributes=dict(required=False, type='dict'), status=dict(required=False, type='str'), )) diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_admin_users.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_admin_users.py index fcde94f8..335e5146 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_admin_users.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_admin_users.py @@ -29,17 +29,20 @@ state: description: - Whether the specified account should exist or not. - required: true choices: ['present', 'absent'] + default: present + type: str element_username: description: - Unique username for this account. (May be 1 to 64 characters in length). required: true + type: str element_password: description: - The password for the new admin account. Setting the password attribute will always reset your password, even if the password is the same + type: str acceptEula: description: @@ -111,7 +114,7 @@ def __init__(self): """ self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), element_username=dict(required=True, type='str'), element_password=dict(required=False, type='str', no_log=True), acceptEula=dict(required=False, type='bool'), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_backup.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_backup.py index 2c7d9638..e7cef219 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_backup.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_backup.py @@ -33,29 +33,34 @@ required: true aliases: - volume_id + type: str dest_hostname: description: - hostname for the backup source cluster - will be set equal to hostname if not specified required: false + type: str dest_username: description: - username for the backup destination cluster - will be set equal to username if not specified required: false + type: str dest_password: description: - password for the backup destination cluster - will be set equal to password if not specified required: false + type: str dest_volume_id: description: - ID of the backup destination volume required: true + type: str format: description: @@ -68,11 +73,13 @@ description: - the backup script to be executed required: false + type: str script_parameters: description: - the backup script parameters required: false + type: dict ''' diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_check_connections.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_check_connections.py index 20e3b2bc..686762a4 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_check_connections.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_check_connections.py @@ -31,16 +31,19 @@ description: - Skip checking connection to SVIP or MVIP. choices: ['svip', 'mvip'] + type: str mvip: description: - Optionally, use to test connection of a different MVIP. - This is not needed to test the connection to the target cluster. + type: str svip: description: - Optionally, use to test connection of a different SVIP. - This is not needed to test the connection to the target cluster. + type: str ''' diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_config.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_config.py index 72374bee..445b57fc 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_config.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_config.py @@ -38,19 +38,22 @@ stage3_block_threshold_percent: description: - The percentage below the "Error" threshold that triggers a cluster "Warning" alert - + type: int max_metadata_over_provision_factor: description: - The number of times metadata space can be overprovisioned relative to the amount of space available - + type: int stage2_aware_threshold: description: - The number of nodes of capacity remaining in the cluster before the system triggers a notification + type: int + type: dict encryption_at_rest: description: - enable or disable the Advanced Encryption Standard (AES) 256-bit encryption at rest on the cluster choices: ['present', 'absent'] + type: str set_ntp_info: description: @@ -62,12 +65,12 @@ - list of NTP servers to add to each nodes NTP configuration type: list elements: str - broadcastclient: type: bool default: False description: - Enables every node in the cluster as a broadcast client + type: dict enable_virtual_volumes: type: bool diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_pair.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_pair.py index 6d5165dd..9a83eaae 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_pair.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_pair.py @@ -35,16 +35,19 @@ description: - Destination IP address of the cluster to be paired. required: true + type: str dest_username: description: - Destination username for the cluster to be paired. - Optional if this is same as source cluster username. + type: str dest_password: description: - Destination password for the cluster to be paired. - Optional if this is same as source cluster password. + type: str ''' diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_snmp.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_snmp.py index 4867e0d5..cbbd9448 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_snmp.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_cluster_snmp.py @@ -35,7 +35,8 @@ the action applies to all nodes in the cluster, and the values that are passed replace, \ in whole, all values set in any previous call to this module. choices: ['present', 'absent'] - default: 'present' + default: present + type: str snmp_v3_enabled: description: @@ -53,19 +54,24 @@ - rw for read-write access. - rosys for read-only access to a restricted set of system information. choices: ['ro', 'rw', 'rosys'] + type: str cidr: description: - A CIDR network mask. This network mask must be an integer greater than or equal to 0, \ and less than or equal to 32. It must also not be equal to 31. + type: int community: description: - SNMP community string. + type: str network: description: - This parameter along with the cidr variable is used to control which network the access and \ community string apply to. - The special value of 'default' is used to specify an entry that applies to all networks. - The cidr mask is ignored when network value is either a host name or default. + type: str + type: dict usm_users: description: @@ -78,24 +84,30 @@ - rwuser for read-write access. - rosys for read-only access to a restricted set of system information. choices: ['rouser', 'rwuser', 'rosys'] + type: str name: description: - The name of the user. Must contain at least one character, but no more than 32 characters. - Blank spaces are not allowed. + type: str password: description: - The password of the user. Must be between 8 and 255 characters long (inclusive). - Blank spaces are not allowed. - Required if 'secLevel' is 'auth' or 'priv.' + type: str passphrase: description: - The passphrase of the user. Must be between 8 and 255 characters long (inclusive). - Blank spaces are not allowed. - Required if 'secLevel' is 'priv.' + type: str secLevel: description: - To define the security level of a user. choices: ['noauth', 'auth', 'priv'] + type: str + type: dict ''' @@ -177,8 +189,8 @@ def __init__(self): options=dict( access=dict(type='str', choices=['rouser', 'rwuser', 'rosys']), name=dict(type='str', default=None), - password=dict(type='str', default=None), - passphrase=dict(type='str', default=None), + password=dict(type='str', default=None, no_log=True), + passphrase=dict(type='str', default=None, no_log=True), secLevel=dict(type='str', choices=['auth', 'noauth', 'priv']) ) ), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_drive.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_drive.py index 544d0cef..8febaaf5 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_drive.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_drive.py @@ -32,6 +32,7 @@ description: - Drive ID or Serial Name of Node drive. - If not specified, add and remove action will be performed on all drives of node_id + type: str state: description: @@ -46,6 +47,7 @@ description: - ID or Name of cluster node. required: true + type: str force_during_upgrade: description: diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_initiators.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_initiators.py index e02e3e63..5e3c224f 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_initiators.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_initiators.py @@ -33,12 +33,16 @@ suboptions: name: description: The name of the initiator. + type: str + required: true alias: description: The friendly name assigned to this initiator. + type: str initiator_id: description: The numeric ID of the initiator. + type: int volume_access_groups: description: A list of volumeAccessGroupIDs to which this initiator belongs. @@ -47,6 +51,7 @@ attributes: description: A set of JSON attributes to assign to this initiator. + type: dict type: list elements: dict @@ -55,6 +60,7 @@ - Whether the specified initiator should exist or not. choices: ['present', 'absent'] default: present + type: str ''' EXAMPLES = """ diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_ldap.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_ldap.py index 4316424b..2ee95922 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_ldap.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_ldap.py @@ -28,50 +28,61 @@ state: description: - Whether the specified volume should exist or not. - required: true choices: ['present', 'absent'] + default: present + type: str authType: description: - Identifies which user authentication method to use. choices: ['DirectBind', 'SearchAndBind'] + type: str groupSearchBaseDn: description: - The base DN of the tree to start the group search (will do a subtree search from here) + type: str groupSearchType: description: - Controls the default group search filter used choices: ['NoGroup', 'ActiveDirectory', 'MemberDN'] + type: str serverURIs: description: - A comma-separated list of LDAP server URIs + type: str userSearchBaseDN: description: - The base DN of the tree to start the search (will do a subtree search from here) + type: str searchBindDN: description: - A dully qualified DN to log in with to perform an LDAp search for the user (needs read access to the LDAP directory). + type: str searchBindPassword: description: - The password for the searchBindDN account used for searching + type: str userSearchFilter: description: - the LDAP Filter to use + type: str userDNTemplate: description: - A string that is used form a fully qualified user DN. + type: str groupSearchCustomFilter: description: - For use with the CustomFilter Search type + type: str ''' EXAMPLES = """ @@ -117,7 +128,7 @@ class NetappElementLdap(object): def __init__(self): self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update( - state=dict(type='str', required=True, choices=['absent', 'present']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), authType=dict(type='str', choices=['DirectBind', 'SearchAndBind']), groupSearchBaseDn=dict(type='str'), groupSearchType=dict(type='str', choices=['NoGroup', 'ActiveDirectory', 'MemberDN']), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_network_interfaces.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_network_interfaces.py index 07e2e8a2..1788d836 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_network_interfaces.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_network_interfaces.py @@ -38,68 +38,83 @@ - static - Used to define Ethernet interfaces with statically allocated IPv4 addresses. choices: ['loopback', 'manual', 'dhcp', 'static'] required: true + type: str ip_address_1g: description: - IP address for the 1G network. required: true + type: str ip_address_10g: description: - IP address for the 10G network. required: true + type: str subnet_1g: description: - 1GbE Subnet Mask. required: true + type: str subnet_10g: description: - 10GbE Subnet Mask. required: true + type: str gateway_address_1g: description: - Router network address to send packets out of the local network. required: true + type: str gateway_address_10g: description: - Router network address to send packets out of the local network. required: true + type: str mtu_1g: description: - Maximum Transmission Unit for 1GbE, Largest packet size that a network protocol can transmit. - Must be greater than or equal to 1500 bytes. default: '1500' + type: str mtu_10g: description: - Maximum Transmission Unit for 10GbE, Largest packet size that a network protocol can transmit. - Must be greater than or equal to 1500 bytes. default: '1500' + type: str dns_nameservers: description: - List of addresses for domain name servers. + type: list + elements: str dns_search_domains: description: - List of DNS search domains. + type: list + elements: str bond_mode_1g: description: - Bond mode for 1GbE configuration. choices: ['ActivePassive', 'ALB', 'LACP'] default: 'ActivePassive' + type: str bond_mode_10g: description: - Bond mode for 10GbE configuration. choices: ['ActivePassive', 'ALB', 'LACP'] default: 'ActivePassive' + type: str lacp_1g: description: @@ -108,6 +123,7 @@ - Fast - Packets are transmitted in 1 second intervals. choices: ['Fast', 'Slow'] default: 'Slow' + type: str lacp_10g: description: @@ -116,10 +132,12 @@ - Fast - Packets are transmitted in 1 second intervals. choices: ['Fast', 'Slow'] default: 'Slow' + type: str virtual_network_tag: description: - This is the primary network tag. All nodes in a cluster have the same VLAN tag. + type: str ''' @@ -186,8 +204,8 @@ def __init__(self): gateway_address_10g=dict(required=True, type='str'), mtu_1g=dict(required=False, type='str', default='1500'), mtu_10g=dict(required=False, type='str', default='1500'), - dns_nameservers=dict(required=False, type=list), - dns_search_domains=dict(required=False, type=list), + dns_nameservers=dict(required=False, type='list', elements='str'), + dns_search_domains=dict(required=False, type='list', elements='str'), bond_mode_1g=dict(required=False, type='str', choices=['ActivePassive', 'ALB', 'LACP'], default='ActivePassive'), bond_mode_10g=dict(required=False, type='str', choices=['ActivePassive', 'ALB', 'LACP'], default='ActivePassive'), lacp_1g=dict(required=False, type='str', choices=['Fast', 'Slow'], default='Slow'), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot.py index 131109dd..015e98ff 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot.py @@ -32,6 +32,7 @@ description: - Name of new snapshot create. - If unspecified, date and time when the snapshot was taken is used. + type: str state: description: @@ -43,16 +44,19 @@ description: - ID or Name of active volume. required: true + type: str account_id: description: - Account ID or Name of Parent/Source Volume. required: true + type: str retention: description: - Retention period for the snapshot. - Format is 'HH:mm:ss'. + type: str src_snapshot_id: description: @@ -60,6 +64,7 @@ - Required when C(state=present), to modify snapshot properties. - Required when C(state=present), to create snapshot from another snapshot in the volume. - Required when C(state=absent), to delete snapshot. + type: str enable_remote_replication: description: @@ -70,23 +75,12 @@ snap_mirror_label: description: - Label used by SnapMirror software to specify snapshot retention policy on SnapMirror endpoint. + type: str expiration_time: description: - The date and time (format ISO 8601 date string) at which this snapshot will expire. - - password: - description: - - Element OS access account password - aliases: - - pass - - username: - description: - - Element OS access account user-name - aliases: - - user - + type: str ''' EXAMPLES = """ diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_restore.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_restore.py index f36cef23..5e0be262 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_restore.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_restore.py @@ -35,22 +35,25 @@ description: - ID or Name of source active volume. required: true + type: str src_snapshot_id: description: - ID or Name of an existing snapshot. required: true + type: str dest_volume_name: description: - New Name of destination for restoring the snapshot required: true + type: str account_id: description: - Account ID or Name of Parent/Source Volume. required: true - + type: str ''' EXAMPLES = """ diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_schedule.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_schedule.py index b5763cc6..2479b5a2 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_schedule.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_snapshot_schedule.py @@ -30,8 +30,8 @@ state: description: - Whether the specified schedule should exist or not. - required: true choices: ['present', 'absent'] + default: present type: str paused: @@ -94,6 +94,7 @@ - It accepts either schedule_id or schedule_name - if name is digit, it will consider as schedule_id - If name is string, it will consider as schedule_name + required: true type: str snapshot_name: @@ -206,7 +207,7 @@ def __init__(self): """ self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), name=dict(required=True, type='str'), schedule_type=dict(required=False, choices=['DaysOfWeekFrequency', 'DaysOfMonthFrequency', 'TimeIntervalFrequency']), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_vlan.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_vlan.py index a3897c74..c77ea39e 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_vlan.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_vlan.py @@ -35,17 +35,20 @@ description: - Virtual Network Tag required: true + type: str name: description: - User defined name for the new VLAN - Name of the vlan is unique - Required for create + type: str svip: description: - Storage virtual IP which is unique - Required for create + type: str address_blocks: description: @@ -59,10 +62,12 @@ description: - Netmask for the VLAN - Required for create + type: str gateway: description: - Gateway for the VLAN + type: str namespace: description: @@ -72,6 +77,7 @@ attributes: description: - Dictionary of attributes with name and value for each attribute + type: dict ''' diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume.py index e4fe5c17..1b56e9ce 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume.py @@ -31,14 +31,16 @@ state: description: - Whether the specified volume should exist or not. - required: true choices: ['present', 'absent'] + default: present + type: str name: description: - The name of the volume to manage. - It accepts volume_name or volume_id required: true + type: str account_id: description: @@ -56,20 +58,24 @@ qos: description: Initial quality of service settings for this volume. Configure as dict in playbooks. + type: dict attributes: description: A YAML dictionary of attributes that you would like to apply on this volume. + type: dict size: description: - The size of the volume in (size_unit). - Required when C(state = present). + type: int size_unit: description: - The unit used to interpret the size parameter. choices: ['bytes', 'b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'] default: 'gb' + type: str access: description: @@ -81,19 +87,7 @@ - If the volume is not paired, the access status is locked. - If unspecified, the access settings of the clone will be the same as the source. choices: ['readOnly', 'readWrite', 'locked', 'replicationTarget'] - - password: - description: - - ElementSW access account password - aliases: - - pass - - username: - description: - - ElementSW access account user-name - aliases: - - user - + type: str ''' EXAMPLES = """ @@ -168,7 +162,7 @@ def __init__(self): self.argument_spec = netapp_utils.ontap_sf_host_argument_spec() self.argument_spec.update(dict( - state=dict(required=True, choices=['present', 'absent']), + state=dict(required=False, type='str', choices=['present', 'absent'], default='present'), name=dict(required=True, type='str'), account_id=dict(required=True), enable512e=dict(type='bool', aliases=['512emulation']), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_clone.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_clone.py index 8309c568..c471846f 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_clone.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_clone.py @@ -50,16 +50,19 @@ attributes: description: A YAML dictionary of attributes that you would like to apply on this cloned volume. + type: dict size: description: - The size of the cloned volume in (size_unit). + type: int size_unit: description: - The unit used to interpret the size parameter. choices: ['bytes', 'b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'] default: 'gb' + type: str access: choices: ['readOnly', 'readWrite', 'locked', 'replicationTarget'] @@ -70,6 +73,7 @@ - readWrite - Reads and writes are allowed. - locked - No reads or writes are allowed. - replicationTarget - Identify a volume as the target volume for a paired set of volumes. If the volume is not paired, the access status is locked. + type: str ''' @@ -128,14 +132,11 @@ def __init__(self): src_volume_id=dict(required=True), src_snapshot_id=dict(), account_id=dict(required=True), - attributes=dict(type='dict', default=None), - size=dict(type='int'), size_unit=dict(default='gb', choices=['bytes', 'b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'], type='str'), - access=dict(type='str', default=None, choices=['readOnly', 'readWrite', 'locked', 'replicationTarget']), diff --git a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_pair.py b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_pair.py index d83c354e..0fc41023 100644 --- a/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_pair.py +++ b/ansible_collections/netapp/elementsw/plugins/modules/na_elementsw_volume_pair.py @@ -34,42 +34,50 @@ description: - Source volume name or volume ID required: true + type: str src_account: description: - Source account name or ID required: true + type: str dest_volume: description: - Destination volume name or volume ID required: true + type: str dest_account: description: - Destination account name or ID required: true + type: str mode: description: - Mode to start the volume pairing choices: ['async', 'sync', 'snapshotsonly'] default: async + type: str dest_mvip: description: - Destination IP address of the paired cluster. required: true + type: str dest_username: description: - Destination username for the paired cluster - Optional if this is same as source cluster username. + type: str dest_password: description: - Destination password for the paired cluster - Optional if this is same as source cluster password. + type: str ''' diff --git a/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.10.txt b/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.10.txt index a1c0bb55..3a0cf091 100644 --- a/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.10.txt +++ b/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.10.txt @@ -1,36 +1,13 @@ -plugins/modules/na_elementsw_access_group.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_access_group.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_access_group_volumes.py validate-modules:doc-required-mismatch -plugins/modules/na_elementsw_account.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_account.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_admin_users.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_admin_users.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_backup.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_backup.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_check_connections.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_cluster_config.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_cluster_pair.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_cluster_pair.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_cluster_snmp.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_drive.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_drive.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_initiators.py validate-modules:doc-required-mismatch plugins/modules/na_elementsw_initiators.py validate-modules:undocumented-parameter plugins/modules/na_elementsw_initiators.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_initiators.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_ldap.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_network_interfaces.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_node.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_snapshot.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_snapshot.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_snapshot_schedule.py validate-modules:doc-required-mismatch -plugins/modules/na_elementsw_snapshot_restore.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_vlan.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_vlan.py validate-modules:doc-missing-type plugins/modules/na_elementsw_volume.py validate-modules:parameter-invalid -plugins/modules/na_elementsw_volume.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_volume_clone.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume_clone.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_volume_pair.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume_pair.py validate-modules:doc-missing-type diff --git a/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.9.txt b/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.9.txt index c6096102..3a0cf091 100644 --- a/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.9.txt +++ b/ansible_collections/netapp/elementsw/tests/sanity/ignore-2.9.txt @@ -1,33 +1,13 @@ -plugins/modules/na_elementsw_access_group.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_access_group.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_account.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_account.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_admin_users.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_admin_users.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_backup.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_backup.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_check_connections.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_cluster_config.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_cluster_pair.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_cluster_pair.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_cluster_snmp.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_drive.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_drive.py validate-modules:doc-missing-type plugins/modules/na_elementsw_initiators.py validate-modules:undocumented-parameter plugins/modules/na_elementsw_initiators.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_initiators.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_ldap.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_network_interfaces.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_node.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_snapshot.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_snapshot.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_snapshot_restore.py validate-modules:parameter-type-not-in-doc -plugins/modules/na_elementsw_vlan.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_vlan.py validate-modules:doc-missing-type plugins/modules/na_elementsw_volume.py validate-modules:parameter-invalid -plugins/modules/na_elementsw_volume.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_volume_clone.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume_clone.py validate-modules:doc-missing-type -plugins/modules/na_elementsw_volume_pair.py validate-modules:parameter-type-not-in-doc plugins/modules/na_elementsw_volume_pair.py validate-modules:doc-missing-type