diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a299b45..283ac72 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,21 @@ Dellemc.Powerstore Change Logs .. contents:: Topics +v1.9.0 +====== + +Minor Changes +------------- + +- Added support for app_type, and app_type_other in volume module. +- Added support for config_type, flr_attributes, host_io_size, file_events_publishing_mode and is_async_mtime_enabled in filesystem module. +- Info module is enhanced to list vCenters and virtual volumes. + +New Modules +----------- + +- dellemc.powerstore.vcenter - Manage vCenter on a PowerStore storage system + v1.8.0 ====== diff --git a/README.md b/README.md index b7bafee..ad4935c 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,29 @@ The Ansible Modules for Dell Technologies (Dell) PowerStore allow Data Center an The capabilities of the Ansible modules are managing volumes, volume groups, hosts, host groups, snapshots, snapshot rules, replication rules, replication sessions, protection policies, file systems, NAS servers, SMB shares, user and tree quotas, file system snapshots, NFS exports, Clusters, Networks, Local users, Jobs, Roles, Certificates, Remote systems, security configuration, DNS server, Email notification destination, NTP server, Remote support configuration, Remote support contacts, SMTP configuration, LDAP accounts and LDAP domain configuration. It also allows gathering high level info from the array. The options available for each are list, show, create, modify and delete. These tasks can be executed by running simple playbooks written in yaml syntax. The modules are written so that all the operations are idempotent, so making multiple identical requests has the same effect as making a single request. ## Table of contents -* [Code of conduct](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CODE_OF_CONDUCT.md) -* [Maintainer guide](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/MAINTAINER_GUIDE.md) -* [Committer guide](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/COMMITTER_GUIDE.md) -* [Contributing guide](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CONTRIBUTING.md) -* [Branching strategy](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/BRANCHING.md) -* [List of adopters](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/ADOPTERS.md) -* [Maintainers](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/MAINTAINERS.md) -* [Support](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/SUPPORT.md) +* [Code of conduct](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CODE_OF_CONDUCT.md) +* [Maintainer guide](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/MAINTAINER_GUIDE.md) +* [Committer guide](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/COMMITTER_GUIDE.md) +* [Contributing guide](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CONTRIBUTING.md) +* [Branching strategy](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/BRANCHING.md) +* [List of adopters](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/ADOPTERS.md) +* [Maintainers](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/MAINTAINERS.md) +* [Support](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/SUPPORT.md) * [License](#license) -* [Security](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/SECURITY.md) +* [Security](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/SECURITY.md) * [Prerequisites](#prerequisites) * [List of Ansible modules for Dell PowerStore](#list-of-ansible-modules-for-dell-powerstore) * [Installation and execution of Ansible modules for Dell PowerStore](#installation-and-execution-of-ansible-modules-for-dell-powerstore) * [Maintenance](#maintenance) ## License -The Ansible collection for PowerStore is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerstore/blob/1.8.0/LICENSE) for the full terms. Ansible modules and modules utilities that are part of the Ansible collection for PowerStore are released and licensed under the Apache 2.0 license. See [MODULE-LICENSE](https://github.com/dell/ansible-powerstore/blob/1.8.0/MODULE-LICENSE) for the full terms. +The Ansible collection for PowerStore is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerstore/blob/1.9.0/LICENSE) for the full terms. Ansible modules and modules utilities that are part of the Ansible collection for PowerStore are released and licensed under the Apache 2.0 license. See [MODULE-LICENSE](https://github.com/dell/ansible-powerstore/blob/1.9.0/MODULE-LICENSE) for the full terms. ## Prerequisites | **Ansible Modules** | **PowerStore Version** | **SDK version** | **Python version** | **Ansible** | |---------------------|-----------------------|-----------------|--------------------|--------------------------| -| v1.8.0 | 2.1.x
3.0.x
3.2.x | 1.9.0 | 3.9.x
3.10.x
3.11.x | 2.12
2.13
2.14 | +| v1.9.0 | 2.1.x
3.0.x
3.2.x | 1.10.0 | 3.9.x
3.10.x
3.11.x | 2.12
2.13
2.14 | * Please follow PyPowerStore installation instructions on [PyPowerStore Documentation](https://github.com/dell/python-powerstore) @@ -35,41 +35,42 @@ The Ansible collection for PowerStore is released and licensed under the GPL-3.0 The modules are written in such a way that all requests are idempotent and hence fault-tolerant. It essentially means that the result of a successfully performed request is independent of the number of times it is executed. ## List of Ansible Modules for Dell PowerStore -* [Volume module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#volume-module) -* [Volume group module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#volume-group-module) -* [Host module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#host-module) -* [Host group module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#host-group-module) -* [Snapshot module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#snapshot-module) -* [Snapshot rule module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#snapshot-rule-module) -* [Replication rule module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#replication-rule-module) -* [Replication session module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#replication-session-module) -* [Protection policy module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#protection-policy-module) -* [Info module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#info-module) -* [File system module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#file-system-module) -* [NAS server module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#nas-server-module) -* [SMB share module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#smb-share-module) -* [Quota module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#quota-module) -* [File system snapshot module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#filesystem-snapshot-module) -* [NFS export module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#nfs-export-module) -* [Cluster module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#cluster-module) -* [Network module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#network-module) -* [Local user module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#local-user-module) -* [Role module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#role-module) -* [Job module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#job-module) -* [Certificate module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#certificate-module) -* [Remote system module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#remote-system-module) -* [Security config module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#security-config-module) -* [DNS module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#dns-module) -* [Email module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#email-module) -* [NTP module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#ntp-module) -* [Remote support module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#remote-support-module) -* [Remote support contact module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#remote-support-contact-module) -* [SMTP config module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#smtp-config-module) -* [LDAP Account module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#ldap-account-module) -* [LDAP Domain module](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/Product%20Guide.md#ldap-domain-module) +* [Volume module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/volume.rst) +* [Volume group module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/volumegroup.rst) +* [Host module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/host.rst) +* [Host group module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/hostgroup.rst) +* [Snapshot module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/snapshot.rst) +* [Snapshot rule module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/snapshotrule.rst) +* [Replication rule module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/replicationrule.rst) +* [Replication session module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/replicationsession.rst) +* [Protection policy module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/protectionpolicy.rst) +* [Info module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/info.rst) +* [File system module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/filesystem.rst) +* [NAS server module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/nasserver.rst) +* [SMB share module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/smbshare.rst) +* [Quota module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/quota.rst) +* [File system snapshot module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/filesystem_snapshot.rst) +* [NFS export module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/nfs.rst) +* [Cluster module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/cluster.rst) +* [Network module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/network.rst) +* [Local user module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/local_user.rst) +* [Role module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/role.rst) +* [Job module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/job.rst) +* [Certificate module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/certificate.rst) +* [Remote system module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/remotesystem.rst) +* [Security config module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/security_config.rst) +* [DNS module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/dns.rst) +* [Email module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/email.rst) +* [NTP module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/ntp.rst) +* [Remote support module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/remote_support.rst) +* [Remote support contact module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/remote_support_contact.rst) +* [SMTP config module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/smtp_config.rst) +* [LDAP Account module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/ldap_account.rst) +* [LDAP Domain module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/ldap_domain.rst) +* [vCenter module](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/modules/vcenter.rst) ## Installation and execution of Ansible modules for Dell PowerStore -The installation and execution steps of Ansible modules for Dell PowerStore can be found [here](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/INSTALLATION.md) +The installation and execution steps of Ansible modules for Dell PowerStore can be found [here](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/INSTALLATION.md) ## Maintenance Ansible Modules for Dell Technologies PowerStore deprecation cycle is aligned with [Ansible](https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html). \ No newline at end of file diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index a8b8f46..594f8ad 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -165,6 +165,11 @@ plugins: name: volume namespace: '' version_added: 1.0.0 + vcenter: + description: Manage vCenter on a PowerStore Storage System + name: volume + namespace: '' + version_added: 1.9.0 volumegroup: description: Manage volume groups on a PowerStore Storage System name: volumegroup @@ -174,4 +179,4 @@ plugins: shell: {} strategy: {} vars: {} -version: 1.8.0 +version: 1.9.0 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index d051755..0d337c2 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -27,8 +27,8 @@ releases: 1.1.0: changes: minor_changes: - - Gather facts module is enhanced to list filesystems, NAS servers, NFS exports, - SMB shares, tree quotas, user quotas. + - Gather facts module is enhanced to list filesystems, + NAS servers, NFS exports, SMB shares, tree quotas, user quotas. modules: - description: Manage File System on Dell PowerStore name: filesystem @@ -55,10 +55,10 @@ releases: 1.2.0: changes: minor_changes: - - Gather facts module is enhanced to list remote systems, replication rules - and replication sessions. - - Protection policy module is enhanced to add/remove replication rule to/from - protection policy. + - Gather facts module is enhanced to list remote systems, + replication rules and replication sessions. + - Protection policy module is enhanced to add/remove replication rule + to/from protection policy. modules: - description: Manage Replication Rules on Dell PowerStore name: replicationrule @@ -71,7 +71,8 @@ releases: changes: minor_changes: - Added dual licensing. - - Gather facts module is enhanced to list users, roles, networks and appliances. + - Gather facts module is enhanced to list users, roles, + networks and appliances. modules: - description: Manage Cluster on Dell PowerStore name: cluster @@ -93,10 +94,10 @@ releases: changes: minor_changes: - Host module is enhanced to provide support for NVMe initiators. - - Info module is enhanced to list certificates, AD/LDAP providers and security - configuration. - - Names of previously released modules have been changed from dellemc_powerstore_\ to \. + - Info module is enhanced to list certificates, AD/LDAP providers and + security configuration. + - Names of previously released modules have been changed from + dellemc_powerstore_\ to \. modules: - description: Manage Certificates on Dell PowerStore name: certificate @@ -111,11 +112,12 @@ releases: 1.5.0: changes: minor_changes: - - Info module is enhanced to list dns servers, email notification destinations, - NTP servers, remote support configuration, remote support contacts and SMTP - configuration. - - Remote support module is added to get the details, modify the attributes, - verify the connection and send a test alert. + - Info module is enhanced to list dns servers, NTP servers, + email notification destinations, remote support configuration, + remote support contacts and SMTP configuration. + - Remote support module is added to get the details, + modify the attributes, verify the connection and + send a test alert. modules: - description: Manage DNS on Dell PowerStore name: dns @@ -139,8 +141,8 @@ releases: 1.6.0: changes: minor_changes: - - Added execution environment manifest file to support building an execution - environment with ansible-builder. + - Added execution environment manifest file to support building an + execution environment with ansible-builder. - Enabled the check_mode support for info module. - Info module is enhanced to list ldap domain, ldap accounts. modules: @@ -154,8 +156,10 @@ releases: 1.7.0: changes: minor_changes: - - Added support for cluster creation and validating cluster creation attributes. - - Added support to associate/disassociate protection policy to/from a NAS server. + - Added support for cluster creation and validating cluster creation + attributes. + - Added support to associate/disassociate protection policy to/from a + NAS server. - Added support to clone, refresh and restore a volume group. - Added support to handle filesystem and NAS server replication sessions. release_date: '2022-09-27' @@ -169,3 +173,16 @@ releases: - Added support to modify the role of replication sessions. - Updated modules to adhere with ansible community guidelines. release_date: '2022-12-21' + 1.9.0: + changes: + minor_changes: + - Added support for app_type, and app_type_other in volume module. + - Added support for config_type, flr_attributes, host_io_size, + file_events_publishing_mode and is_async_mtime_enabled in filesystem + module. + - Info module is enhanced to list vCenters and virtual volumes. + modules: + - description: Manage vCenter on Dell PowerStore + name: vcenter + namespace: '' + release_date: '2023-03-31' diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a83458f..3eff29d 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -10,7 +10,7 @@ You may obtain a copy of the License at # How to contribute -Become one of the contributors to this project! We thrive to build a welcoming and open community for anyone who wants to use the project or contribute to it. There are just a few small guidelines you need to follow. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CODE_OF_CONDUCT.md). +Become one of the contributors to this project! We thrive to build a welcoming and open community for anyone who wants to use the project or contribute to it. There are just a few small guidelines you need to follow. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CODE_OF_CONDUCT.md). ## Table of contents @@ -76,7 +76,7 @@ Triage helps ensure that issues resolve quickly by: If you don't have the knowledge or time to code, consider helping with _issue triage_. The Ansible modules for Dell PowerStore community will thank you for saving them time by spending some of yours. -Read more about the ways you can [Triage issues](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/ISSUE_TRIAGE.md). +Read more about the ways you can [Triage issues](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/ISSUE_TRIAGE.md). ## Your first contribution @@ -89,7 +89,7 @@ When you're ready to contribute, it's time to create a pull request. ## Branching -* [Branching Strategy for Ansible modules for Dell PowerStore](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/BRANCHING.md) +* [Branching Strategy for Ansible modules for Dell PowerStore](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/BRANCHING.md) ## Signing your commits @@ -144,7 +144,7 @@ Make sure that the title for your pull request uses the same format as the subje ### Quality gates for pull requests -GitHub Actions are used to enforce quality gates when a pull request is created or when any commit is made to the pull request. These GitHub Actions enforce our minimum code quality requirement for any code that get checked into the repository. If any of the quality gates fail, it is expected that the contributor will look into the check log, understand the problem and resolve the issue. If help is needed, please feel free to reach out the maintainers of the project for [support](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/SUPPORT.md). +GitHub Actions are used to enforce quality gates when a pull request is created or when any commit is made to the pull request. These GitHub Actions enforce our minimum code quality requirement for any code that get checked into the repository. If any of the quality gates fail, it is expected that the contributor will look into the check log, understand the problem and resolve the issue. If help is needed, please feel free to reach out the maintainers of the project for [support](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/SUPPORT.md). #### Code sanitization diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index da027ff..17ddca0 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -41,7 +41,7 @@ You may obtain a copy of the License at * Download the latest tar build from any of the available distribution channel [Ansible Galaxy](https://galaxy.ansible.com/dellemc/powerstore) /[Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/dellemc/powerstore) and use this command to install the collection anywhere in your system: - ansible-galaxy collection install dellemc-powerstore-1.8.0.tar.gz -p + ansible-galaxy collection install dellemc-powerstore-1.9.0.tar.gz -p * Set the environment variable: @@ -68,7 +68,7 @@ You may obtain a copy of the License at ## Ansible modules execution -The Ansible server must be configured with Python library for PowerStore to run the Ansible playbooks. The [Documents](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/) provide information on different Ansible modules along with their functions and syntax. The parameters table in the Product Guide provides information on various parameters which needs to be configured before running the modules. +The Ansible server must be configured with Python library for PowerStore to run the Ansible playbooks. The [Documents](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/) provide information on different Ansible modules along with their functions and syntax. The parameters table in the Product Guide provides information on various parameters which needs to be configured before running the modules. ## SSL certificate validation diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md index dcaf66a..9a7c1f3 100644 --- a/docs/ISSUE_TRIAGE.md +++ b/docs/ISSUE_TRIAGE.md @@ -43,8 +43,8 @@ Should explain what happened, what was expected and how to reproduce it together - Ansible Version: [e.g. 2.14] - Python Version [e.g. 3.11] - - Ansible modules for Dell PowerStore Version: [e.g. 1.8.0] - - PowerStore SDK version: [e.g. PyPowerStore 1.9.0] + - Ansible modules for Dell PowerStore Version: [e.g. 1.9.0] + - PowerStore SDK version: [e.g. PyPowerStore 1.10.0] - Any other additional information... #### Feature requests diff --git a/docs/MAINTAINERS.md b/docs/MAINTAINERS.md index 201e1d9..4679f6d 100644 --- a/docs/MAINTAINERS.md +++ b/docs/MAINTAINERS.md @@ -10,9 +10,9 @@ You may obtain a copy of the License at # Maintainers -* @ananthu-kuttattu -* @bhavneet-sharma -* @jennifer-john -* @pavan-mudunuri -* @trisha-datta -* @Previnkumar_G \ No newline at end of file +* Ananthu Kuttattu (kuttattz) +* Bhavneet Sharma (Bhavneet-Sharma) +* Jennifer John (Jennifer-John) +* Meenakshi Dembi (meenakshidembi691) +* Pavan Mudunuri (Pavan-Mudunuri) +* Trisha Datta (trisha-dell) diff --git a/docs/MAINTAINER_GUIDE.md b/docs/MAINTAINER_GUIDE.md index c75f83d..558d5fd 100644 --- a/docs/MAINTAINER_GUIDE.md +++ b/docs/MAINTAINER_GUIDE.md @@ -27,7 +27,7 @@ If a candidate is approved, a Maintainer contacts the candidate to invite them t ## Maintainer policies * Lead by example -* Follow the [Code of Conduct](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CODE_OF_CONDUCT.md) and the guidelines in the [Contributing](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CONTRIBUTING.md) and [Committer](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/COMMITTER_GUIDE.md) guides +* Follow the [Code of Conduct](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CODE_OF_CONDUCT.md) and the guidelines in the [Contributing](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CONTRIBUTING.md) and [Committer](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/COMMITTER_GUIDE.md) guides * Promote a friendly and collaborative environment within our community * Be actively engaged in discussions, answering questions, updating defects, and reviewing pull requests * Criticize code, not people. Ideally, tell the contributor a better way to do what they need. diff --git a/docs/Product Guide.md b/docs/Product Guide.md deleted file mode 100644 index daeca89..0000000 --- a/docs/Product Guide.md +++ /dev/null @@ -1,12190 +0,0 @@ -# Ansible Modules for Dell Technologies PowerStore -## Product Guide 1.8.0 -© 2022 Dell Inc. or its subsidiaries. All rights reserved. Dell and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners. - --------------- -## Contents -* [Certificate Module](#certificate-module) - * [Synopsis](#synopsis) - * [Parameters](#parameters) - * [Notes](#notes) - * [Examples](#examples) - * [Return Values](#return-values) - * [Authors](#authors) -* [Cluster Module](#cluster-module) - * [Synopsis](#synopsis-1) - * [Parameters](#parameters-1) - * [Notes](#notes-1) - * [Examples](#examples-1) - * [Return Values](#return-values-1) - * [Authors](#authors-1) -* [DNS Module](#dns-module) - * [Synopsis](#synopsis-2) - * [Parameters](#parameters-2) - * [Notes](#notes-2) - * [Examples](#examples-2) - * [Return Values](#return-values-2) - * [Authors](#authors-2) -* [Email Module](#email-module) - * [Synopsis](#synopsis-3) - * [Parameters](#parameters-3) - * [Notes](#notes-3) - * [Examples](#examples-3) - * [Return Values](#return-values-3) - * [Authors](#authors-3) -* [File System Module](#file-system-module) - * [Synopsis](#synopsis-4) - * [Parameters](#parameters-4) - * [Notes](#notes-4) - * [Examples](#examples-4) - * [Return Values](#return-values-4) - * [Authors](#authors-4) -* [Filesystem Snapshot Module](#filesystem-snapshot-module) - * [Synopsis](#synopsis-5) - * [Parameters](#parameters-5) - * [Notes](#notes-5) - * [Examples](#examples-5) - * [Return Values](#return-values-5) - * [Authors](#authors-5) -* [Host Module](#host-module) - * [Synopsis](#synopsis-6) - * [Parameters](#parameters-6) - * [Notes](#notes-6) - * [Examples](#examples-6) - * [Return Values](#return-values-6) - * [Authors](#authors-6) -* [Host Group Module](#host-group-module) - * [Synopsis](#synopsis-7) - * [Parameters](#parameters-7) - * [Notes](#notes-7) - * [Examples](#examples-7) - * [Return Values](#return-values-7) - * [Authors](#authors-7) -* [Info Module](#info-module) - * [Synopsis](#synopsis-8) - * [Parameters](#parameters-8) - * [Notes](#notes-8) - * [Examples](#examples-8) - * [Return Values](#return-values-8) - * [Authors](#authors-8) -* [Job Module](#job-module) - * [Synopsis](#synopsis-9) - * [Parameters](#parameters-9) - * [Notes](#notes-9) - * [Examples](#examples-9) - * [Return Values](#return-values-9) - * [Authors](#authors-9) -* [LDAP Account Module](#ldap-account-module) - * [Synopsis](#synopsis-10) - * [Parameters](#parameters-10) - * [Notes](#notes-10) - * [Examples](#examples-10) - * [Return Values](#return-values-10) - * [Authors](#authors-10) -* [LDAP Domain Module](#ldap-domain-module) - * [Synopsis](#synopsis-11) - * [Parameters](#parameters-11) - * [Notes](#notes-11) - * [Examples](#examples-11) - * [Return Values](#return-values-11) - * [Authors](#authors-11) -* [Local User Module](#local-user-module) - * [Synopsis](#synopsis-12) - * [Parameters](#parameters-12) - * [Notes](#notes-12) - * [Examples](#examples-12) - * [Return Values](#return-values-12) - * [Authors](#authors-12) -* [NAS Server Module](#nas-server-module) - * [Synopsis](#synopsis-13) - * [Parameters](#parameters-13) - * [Notes](#notes-13) - * [Examples](#examples-13) - * [Return Values](#return-values-13) - * [Authors](#authors-13) -* [Network Module](#network-module) - * [Synopsis](#synopsis-14) - * [Parameters](#parameters-14) - * [Notes](#notes-14) - * [Examples](#examples-14) - * [Return Values](#return-values-14) - * [Authors](#authors-14) -* [NFS Module](#nfs-module) - * [Synopsis](#synopsis-15) - * [Parameters](#parameters-15) - * [Notes](#notes-15) - * [Examples](#examples-15) - * [Return Values](#return-values-15) - * [Authors](#authors-15) -* [NTP Module](#ntp-module) - * [Synopsis](#synopsis-16) - * [Parameters](#parameters-16) - * [Notes](#notes-16) - * [Examples](#examples-16) - * [Return Values](#return-values-16) - * [Authors](#authors-16) -* [Protection Policy Module](#protection-policy-module) - * [Synopsis](#synopsis-17) - * [Parameters](#parameters-17) - * [Notes](#notes-17) - * [Examples](#examples-17) - * [Return Values](#return-values-17) - * [Authors](#authors-17) -* [Quota Module](#quota-module) - * [Synopsis](#synopsis-18) - * [Parameters](#parameters-18) - * [Notes](#notes-18) - * [Examples](#examples-18) - * [Return Values](#return-values-18) - * [Authors](#authors-18) -* [Remote Support Module](#remote-support-module) - * [Synopsis](#synopsis-19) - * [Parameters](#parameters-19) - * [Notes](#notes-19) - * [Examples](#examples-19) - * [Return Values](#return-values-19) - * [Authors](#authors-19) -* [Remote Support Contact Module](#remote-support-contact-module) - * [Synopsis](#synopsis-20) - * [Parameters](#parameters-20) - * [Notes](#notes-20) - * [Examples](#examples-20) - * [Return Values](#return-values-20) - * [Authors](#authors-20) -* [Remote System Module](#remote-system-module) - * [Synopsis](#synopsis-21) - * [Parameters](#parameters-21) - * [Notes](#notes-21) - * [Examples](#examples-21) - * [Return Values](#return-values-21) - * [Authors](#authors-21) -* [Replication Rule Module](#replication-rule-module) - * [Synopsis](#synopsis-22) - * [Parameters](#parameters-22) - * [Notes](#notes-22) - * [Examples](#examples-22) - * [Return Values](#return-values-22) - * [Authors](#authors-22) -* [Replication Session Module](#replication-session-module) - * [Synopsis](#synopsis-23) - * [Parameters](#parameters-23) - * [Notes](#notes-23) - * [Examples](#examples-23) - * [Return Values](#return-values-23) - * [Authors](#authors-23) -* [Role Module](#role-module) - * [Synopsis](#synopsis-24) - * [Parameters](#parameters-24) - * [Notes](#notes-24) - * [Examples](#examples-24) - * [Return Values](#return-values-24) - * [Authors](#authors-24) -* [Security Config Module](#security-config-module) - * [Synopsis](#synopsis-25) - * [Parameters](#parameters-25) - * [Notes](#notes-25) - * [Examples](#examples-25) - * [Return Values](#return-values-25) - * [Authors](#authors-25) -* [SMB Share Module](#smb-share-module) - * [Synopsis](#synopsis-26) - * [Parameters](#parameters-26) - * [Notes](#notes-26) - * [Examples](#examples-26) - * [Return Values](#return-values-26) - * [Authors](#authors-26) -* [SMTP Config Module](#smtp-config-module) - * [Synopsis](#synopsis-27) - * [Parameters](#parameters-27) - * [Notes](#notes-27) - * [Examples](#examples-27) - * [Return Values](#return-values-27) - * [Authors](#authors-27) -* [Snapshot Module](#snapshot-module) - * [Synopsis](#synopsis-28) - * [Parameters](#parameters-28) - * [Notes](#notes-28) - * [Examples](#examples-28) - * [Return Values](#return-values-28) - * [Authors](#authors-28) -* [Snapshot Rule Module](#snapshot-rule-module) - * [Synopsis](#synopsis-29) - * [Parameters](#parameters-29) - * [Notes](#notes-29) - * [Examples](#examples-29) - * [Return Values](#return-values-29) - * [Authors](#authors-29) -* [Volume Module](#volume-module) - * [Synopsis](#synopsis-30) - * [Parameters](#parameters-30) - * [Notes](#notes-30) - * [Examples](#examples-30) - * [Return Values](#return-values-30) - * [Authors](#authors-30) -* [Volume Group Module](#volume-group-module) - * [Synopsis](#synopsis-31) - * [Parameters](#parameters-31) - * [Notes](#notes-31) - * [Examples](#examples-31) - * [Return Values](#return-values-31) - * [Authors](#authors-31) - --------------- - -# Certificate Module - -Certificate operations for PowerStore Storage System - -### Synopsis - Supports the provisioning operations on a Certificate such as add/import, modify, reset, exchange and get the details of a certificate. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
certificate_id str
Unique identifier of the certificate.
Mandatory only for modify operation.
certificate_type str
  • Server
  • Client
  • CA_Client_Validation
  • CA_Server_Validation

Type of the certificate.
service str
  • Management_HTTP
  • Replication_HTTP
  • VASA_HTTP
  • Import_HTTP
  • LDAP_HTTP
  • Syslog_HTTP

Type of the service for which the certificate is used.
Mandatory for reset and exchange operation.
scope str
Defines a subset of certificates belonging to one Service.
certificate str
Concatenated PEM encoded x509_certificate string from end-entity certificate to root certificate.
remote_address str
IPv4 or DNS name of the remote cluster.
remote_user str
The username of the remote cluster.
remote_password str
The password of the remote cluster.
remote_port int
The port address of the remote cluster.
is_current bool
Indicates whether this is the current X509 certificate to be used by the service or this X509 Certificate will be used in the future.
state str True
  • absent
  • present

Define whether the certificate should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Idempotency is not supported for adding/importing certificates, exchange of certificates and the reset of certificates. -* Only is_current parameter is supported for modification of certificate. -* Reset operation can reset more than one certificate at a time. -* Add/import, modify and reset are supported for PowerStore versions 2.0 and above only. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get details of certificate with certificate_id - dellemc.powerstore.certificate: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - certificate_id: "e940144f-393f-4e9c-8f54-9a4d57b38c48" - state: "present" - -- name: Reset certificates - dellemc.powerstore.certificate: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - service: "VASA_HTTP" - state: "present" - -- name: Add/import a certificate - dellemc.powerstore.certificate: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - certificate_type: "CA_Client_Validation" - service: "VASA_HTTP" - certificate: "{{certificate_string}}" - is_current: True - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
certificate_details complex When certificate exists Details of the certificate.
  id str success The system generated ID given to the certificate.
  is_current bool success Whether the certificate can be used now or not.
  is_valid bool success Indicates whether this is a valid X509 certificate.
  members complex success Member certificates included in this x509_certificate.
   certificate str success Base64 encoded certificate without any line breaks.
   depth str success Depth indicates the position of this member certificate in the X509 Certificate chain.
   issuer str success Distinguished name of the certificate issuer.
   key_length int success Private key length.
   public_key_algorithm str success Public key algorithm used to generate the key pair.
   serial_number str success Certificate serial number.
   signature_algorithm str success Certificate signature algorithm.
   subject str success Certificate subject or so called distinguished name.
   subject_alternative_names list success Additional DNS names or IP addresses in the x509_certificate.
   thumbprint str success CeHash value of the certificate.
   thumbprint_algorithm str success The thumbprint algorithm.
   thumbprint_algorithm_l10n str success Localized message string corresponding to thumbprint_algorithm.
   valid_from str success Date and time when the certificate becomes valid.
   valid_to str success Date and time when the certificate will expire.
  service str success Type of the service for which the certificate is used.
  service_l10n str success Localized message string corresponding to service.
  type str success Type of the certificate.
  type_l10n str success Localized message string corresponding to type.
changed bool always Whether or not the resource has changed.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# Cluster Module - -Manage cluster related operations on PowerStore - -### Synopsis - Managing cluster on PowerStore storage system includes creating cluster, validating create cluster attributes, getting details and modifying cluster configuration parameters. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
cluster_name str
The Name of cluster.
chap_mode str
  • Disabled
  • Single
  • Mutual

The mode that describes or sets the iSCSI CHAP mode for the cluster.
cluster_id str
Id of the cluster.
new_name str
The new name for the cluster.
service_password str
The password for the service user.
appliance_id str
ID of the appliance.
Parameters appliance_id and appliance_name are mutually exclusive.
Parameter is_ssh_enabled has to be passed along with appliance_id.
appliance_name str
Name of the appliance.
Parameters appliance_id and appliance_name are mutually exclusive.
Parameter is_ssh_enabled has to be passed along with appliance_name.
is_ssh_enabled bool
Whether SSH access is enabled for the cluster.
Either appliance_id or appliance_name is to be passed along with is_ssh_enabled.
physical_mtu int
MTU for ethernet ports in the cluster.
The MTU can be set between 1500 to 9000.
ignore_network_warnings bool
Whether to ignore the network warning about unreachable external network.
appliances list
elements: dict

Appliance configuration setting during cluster creation.
This is mandatory for create cluster operation.
  link_local_address str True
The unique IPv4 address of the appliance and is set by zeroconf.
  name str
Name of new appliance.
  drive_failure_tolerance_level str
  • Single
  • Double

Specifies the possible drive failure tolerance levels.
dns_servers list
elements: str

DNS server addresses in IPv4 format. At least one DNS server should be provided.
This is mandatory for create cluster operation.
ntp_servers list
elements: str

NTP server addresses in IPv4 or hostname format. At least one NTP server should be provided.
This is mandatory for create cluster operation.
physical_switches list
elements: dict

Physical switch setting for a new cluster.
  name str True
Name of the physical switch.
  purpose str True
  • Data_and_Management
  • Management_Only

Specifies the purpose of the physical switch.
  connections list
elements: dict
True
specifies the supported connection for the physical switch.
   address str True
Specifies the physical switch address in IPv4 or DNS hostname format.
   port int
Specifies the port used for connection to switch.
   connect_method str True
  • SSH
  • SNMPv2c

Specifies the connection method type for the physical Switch.
   username str
Specifies username to connect a physical switch for SSH connection method.
   ssh_password str
Specifies SSH password to connect a physical switch.
   snmp_community_string str
Specifies SNMPv2 community string, if SNMPv2 connect method is selected.
networks list
elements: dict

Configuration of one or more network(s) based on network type.
This is mandatory for create cluster operation.
  type str True
  • Management
  • Intra_Cluster_Management
  • Intra_Cluster_Data
  • Storage
  • VMotion
  • File_Mobility

Specifies the type of the network.
  vlan_id int
The ID of the VLAN.
  prefix_length int True
Network prefix length.
  gateway str
Network gateway in IPv4 format.
  cluster_mgmt_address str
New cluster management IP address in IPv4 format.
  storage_discovery_address str
New storage discovery IP address in IPv4 format.
This can be specified only when configure the storage network type.
  addresses list
elements: str
True
IP addresses in IPv4 format.
  purposes list
elements: str
  • ISCSI
  • NVMe_TCP
  • File_Mobility

Purpose of the network.
Only applicable for storage network.
vcenters list
elements: dict

Configure vCenter settings when creating cluster.
Currently, for vcenters parameter API supports only single element.
This is required when creating PowerStore X cluster and optional for PowerStore T.
  address str True
IP address of vCenter in IPv4 or hostname format.
  username str True
User name to login to vCenter.
  password str True
Password to login to vCenter.
  is_verify_server_cert bool True
Whether or not the connection will be secured with the vcenter SSL certificate.
  data_center_name str
Name of the data center.
This is used to join an existing datacenter in vcenter.
This should be specified when creating PowerStore X cluster.
Mutually exclusive with data_center_id.
  data_center_id str
The VMWare ID of datacenter.
This is used to join an existing datacenter in vcenter.
This should be specified when creating PowerStore X cluster.
Mutually exclusive with data_center_name.
  esx_cluster_name str
Name of the ESXi cluster.
This should be specified when creating PowerStore X cluster.
  vasa_provider_credentials dict True
Storage system credentials for vCenter to use for communicating with the storage system using VASA.
   username str True
Username of the local user account which will be used by vSphere to register VASA provider.
   password str True
Password of the local user account which will be used by vSphere to register VASA provider.
is_http_redirect_enabled bool
Whether to redirect the HTTP requests to HTTPS.
validate_create bool True
Whether to perform create cluster validate call.
wait_for_completion bool False
Flag to indicate if the operation should be run synchronously or asynchronously.
True signifies synchronous execution. By default, create cluster operation will run asynchronously.
state str True
  • absent
  • present

Define whether the cluster should exist or not.
Value present indicates that the cluster should exist on the system.
Value absent indicates that the cluster should not exist on the system.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Deletion of a cluster is not supported by ansible module. -* The check_mode is not supported. -* Before performing create operation, the default password for admin user and service user should be changed. -* For management type network during cluster creation, storage_discovery_address and purposes should not be passed. -* The vcenters parameter is mandatory for PowerStore X cluster creation. -* Minimum 3 and 5 addresses are required for management network for PowerStore T and X model respectively. -* The File_Mobility purpose is supported only in FootHills Prime and above. -* Parameter is_http_redirect_enabled is supported only in PowerStore FootHills Prime and above. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get the details of cluster using id - dellemc.powerstore.cluster: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - cluster_id: "0" - state: "present" - -- name: Modify details of cluster using the name - dellemc.powerstore.cluster: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - cluster_name: "RT-D1320" - appliance_id: "A1" - is_ssh_enabled: True - service_password: "S@mple_password" - chap_mode: "Disabled" - new_name: "new_RT-D1320" - state: "present" - -- name: Create cluster - dellemc.powerstore.cluster: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - cluster_name: "RT-D1320" - ignore_network_warnings: True - appliances: - - link_local_address: "1.2.x.x" - name: "Ansible_cluster" - derive_failure_tolerance_level: "Double" - dns_servers: - - "1.1.x.x" - ntp_servers: - - "1.3.x.x" - physical_switch: - - name: "Ansible_switch" - purpose: "Management_Only" - connections: - - address: "1.x.x.x" - port: 20 - connect_method: "SSH" - username: "user" - ssh_password: "password" - networks: - - type: "Management" - vlan_id: 0 - prefix_length: 24 - gateway: "1.x.x.x" - cluster_mgmt_address: "1.x.x.x" - addresses: - - "2.x.x.x" - - "3.x.x.x" - - type: "Storage" - vlan_id: 0 - prefix_length: 42 - gateway: "1.x.x.x" - storage_discovery_address: "1.x.x.x" - addresses: - - "2.x.x.x" - - "3.x.x.x" - purpose: - - "ISCSI" - vcenters: - - address: "1.x.x.x" - username: "user" - password: "password" - is_verify_server_cert: True - vasa_provider_credentials: - username: "user" - password: "password" - is_http_redirect_enabled: True - wait_for_completion: False - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
cluster_details complex When Cluster exists. The cluster details.
  appliance_count int success Number of appliances configured in this cluster.
  appliance_details complex success Name and Id of the appliance for which is_ssh_enabled parameter is used.
   id str success Id of the appliance.
   name str success Name of the appliance.
  compatibility_level int success The behavioral version of the software version API, It is used to ensure the compatibility across potentially different software versions.
  global_id str success The global unique identifier of the cluster.
  id str success The ID of the cluster.
  is_encryption_enabled bool success Whether or not Data at Rest Encryption is enabled on the cluster.
  is_ssh_enabled bool success Whether or not the ssh is enabled.
  management_address str success The floating management IP address for the cluster in IPv4 or IPv6 format.
  master_appliance_id str success The unique identifier of the appliance acting as primary. This parameter is deprecated in version 2.0.0.0.
  name str success Name of the cluster.
  physical_mtu int success MTU for the cluster.
  primary_appliance_id str success The unique identifier of the appliance acting as primary. This parameter was added in version 2.0.0.0.
  service_config_details complex success Details of the service config for the entered appliance.
   appliance_id str success Id of the appliance for which the service configuration exists.
   id str success Id of the service configuration.
   is_ssh_enabled bool success Whether the ssh is enabled for the appliance or not.
  service_user_details complex success Details of the service user for which the password can be updated.
   id str success Id of the service user.
   is_built_in bool success Whether the service user is built in or not.
   is_default_password bool success Whether the service user has default password or not.
   name str success Name of the service user.
  state str success Possible cluster states.
  storage_discovery_address str success The floating storage discovery IP address for the cluster in IPv4 or IPv6 format.
  system_time str success Current clock time for the system. System time and all the system reported times are in UTC (GMT+0:00) format.
job_details complex When asynchronous task is performed. The job details.
  id str success The ID of the job.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) -* Bhavneet Sharma (@sharmb5) - --------------------------------- -# DNS Module - -DNS operations on a PowerStore storage system - -### Synopsis - Performs all DNS operations on a PowerStore Storage System. This module supports get details of an existing DNS instance. You can modify existing DNS instance with supported parameters. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
dns_id str True
Unique identifier of the DNS instance.
dns_addresses list
elements: str

DNS server addresses in IPv4 format.
dns_address_state str
  • present-in-dns
  • absent-in-dns

State of the addresses mentioned in dns_addresses.
state str True
  • present
  • absent

The state of the DNS instance after the task is performed.
For get and modify operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Minimum 1 and maximum 3 addresses can be associated to a DNS instance. -* Parameters dns_addresses and dns_address_state are required together. -* Creation and deletion of DNS is not supported. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of DNS instance - dellemc.powerstore.dns: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - dns_id: "DNS1" - state: "present" - - - name: Add addresses to DNS instance - dellemc.powerstore.dns: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - dns_id: "DNS1" - dns_addresses: - - "XX.XX.XX.XX" - - "YY.YY.YY.YY" - dns_address_state: "present-in-dns" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
dns_details complex When DNS exists. Details of the DNS instance.
  addresses str success DNS server addresses in IPv4 format.
  id str success Unique identifier of DNS instance.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# Email Module - -Destination Email operations on a PowerStore storage system - -### Synopsis - Performs all destination email operations on a PowerStore Storage System. - This module supports get details of an existing destination email address. Create/Add new destination email address for all supported parameters. - This Module supports modify destination email address with supported parameters. - This Module supports delete/remove a specific destination email address. Send a test mail to a specific destination email address. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
email_id str
Unique identifier of the destination email address.
Mutually exclusive with email_address.
email_address str
Email address to receive notifications.
Mutually exclusive with email_id.
new_address str
New email address to receive notifications.
send_test_email bool False
Whether to send the test email to the destination email address.
notify dict
Whether to send different types of notifications. It contains below optional candidate variables.
  critical bool False
Whether to send notifications for critical alerts.
  major bool False
Whether to send notifications for major alerts.
  minor bool False
Whether to send notifications for minor alerts.
  info bool False
Whether to send notifications for informational alerts.
state str True
  • present
  • absent

The state of the destination email address after the task is performed.
For Delete operation only, it should be set to "absent".
For all Create, Modify, Test or Get details operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Idempotency is not supported for Test operation of Email module. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of destination email with email_id - dellemc.powerstore.email: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - email_id: "780b6220-2d0b-4b9f-a485-4ae7f673bd98" - state: "present" - - - name: Create destination email - dellemc.powerstore.email: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - email_address: "abc_xyz@dell.com" - notify: - info: True - critical: True - major: False - state: "present" - - - name: Send a test mail to the destination email with email_id - dellemc.powerstore.email: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - email_id: "780b6220-2d0b-4b9f-a485-4ae7f673bd98" - send_test_email: True - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
email_details complex When destination email address exists Details of the destination email address.
  email_address str success Email address to receive notifications.
  id str success The system generated ID of the destination email instance.
  notify complex success ['Whether to send different types of notifications.']
   critical bool success Whether to send notifications for critical alerts.
   info bool success Whether to send notifications for informational alerts.
   major bool success Whether to send notifications for major alerts.
   minor bool success Whether to send notifications for minor alerts.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# File System Module - -Filesystem operations for PowerStore Storage system - -### Synopsis - Supports the provisioning operations on a filesystem such as create, modify, delete and get the details of a filesystem. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
filesystem_name str
Name of the file system. Mutually exclusive with filesystem_id. Mandatory only for create operation.
filesystem_id str
Unique id of the file system. Mutually exclusive with filesystem_name.
description str
Description of the file system.
nas_server str
Name or ID of the NAS Server on which the file system is created. Mandatory parameter whenever filesystem_name is provided, since filesystem names are unique only within a NAS server.
size int
Size that the file system presents to the host or end user. Mandatory only for create operation.
cap_unit str
  • GB
  • TB

Capacity unit for the size.
It defaults to 'GB', if not specified.
access_policy str
  • NATIVE
  • UNIX
  • WINDOWS

File system security access policies.
locking_policy str
  • ADVISORY
  • MANDATORY

File system locking policies. ADVISORY- No lock checking for NFS and honor SMB lock range only for SMB. MANDATORY- Honor SMB and NFS lock range.
folder_rename_policy str
  • ALL_ALLOWED
  • SMB_FORBIDDEN
  • ALL_FORBIDDEN

File system folder rename policies for the file system with multi-protocol access enabled.
ALL_ALLOWED - All protocols are allowed to rename directories without any restrictions.
SMB_FORBIDDEN - A directory rename from the SMB protocol will be denied if at least one file is opened in the directory or in one of its child directories.
All_FORBIDDEN - Any directory rename request will be denied regardless of the protocol used, if at least one file is opened in the directory or in one of its child directories.
smb_properties dict
Advance settings for SMB. It contains below optional candidate variables.
  is_smb_sync_writes_enabled bool False
Indicates whether the synchronous writes option is enabled on the file system.
  is_smb_no_notify_enabled bool False
Indicates whether notifications of changes to directory file structure are enabled.
  is_smb_op_locks_enabled bool False
Indicates whether opportunistic file locking is enabled on the file system.
  is_smb_notify_on_access_enabled bool False
Indicates whether file access notifications are enabled on the file system.
  is_smb_notify_on_write_enabled bool False
Indicates whether file write notifications are enabled on the file system.
  smb_notify_on_change_dir_depth int False
Integer variable , determines the lowest directory level to which the enabled notifications apply. minimum value is 1.
protection_policy str
Name or ID of the protection policy applied to the file system.
Specifying "" (empty string) removes the existing protection policy from file system.
quota_defaults dict
Contains the default attributes for a filesystem quota.It contains below optional candidate variables.
  grace_period int False
Grace period of soft limit.
  grace_period_unit str False
  • days
  • weeks
  • months

Unit of the grace period of soft limit.
  default_hard_limit int False
Default hard limit of user quotas and tree quotas.
  default_soft_limit int False
Default soft limit of user quotas and tree quotas.
  cap_unit str False
  • GB
  • TB

Capacity unit for default hard & soft limit.
state str True
  • absent
  • present

Define whether the filesystem should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* It is recommended to remove the protection policy before deleting the filesystem. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Create FileSystem by Name - register: result_fs - dellemc.powerstore.filesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - filesystem_name: "{{filesystem_name}}" - description: "{{description}}" - nas_server: "{{nas_server_id}}" - size: "5" - cap_unit: "GB" - access_policy: "UNIX" - locking_policy: "MANDATORY" - smb_properties: - is_smb_no_notify_enabled: True - is_smb_notify_on_access_enabled: True - quota_defaults: - grace_period: 1 - grace_period_unit: 'days' - default_hard_limit: 3 - default_soft_limit: 2 - protection_policy: "{{protection_policy_id}}" - state: "present" - - - name: Get File System details by id - dellemc.powerstore.filesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - filesystem_id: "{{result_fs.filesystem_details.id}}" - state: "present" - - - name: Delete File System by id - dellemc.powerstore.filesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - filesystem_id: "{{result_fs.filesystem_details.id}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
filesystem_details complex When filesystem exists Details of the filesystem.
  access_policy str success Access policy about the filesystem.
  default_hard_limit int success Default hard limit period for a filesystem quota in byte.
  default_soft_limit int success Default soft limit period for a filesystem quota in byte.
  description str success The description about the filesystem.
  grace_period int success Default grace period for a filesystem quota in second.
  id str success The system generated ID given to the filesystem.
  is_smb_no_notify_enabled bool success Whether smb notify policy is enabled for a filesystem.
  is_smb_notify_on_access_enabled bool success Whether smb on access notify policy is enabled.
  is_smb_op_locks_enabled bool success Whether smb op lock is enabled.
  locking_policy str success Locking policy about the filesystem.
  name str success Name of the filesystem.
  nas_server dict success Id and name of the nas server to which the filesystem belongs.
  protection_policy dict success Id and name of the protection policy associated with the filesystem.
  size_total int success Total size of the filesystem in bytes.
  size_used int success Used size of the filesystem in bytes.
  snapshots list success Id and name of the snapshots of a filesystem.
  total_size_with_unit str success Total size of the filesystem with appropriate unit.
  used_size_with_unit str success Used size of the filesystem with appropriate unit.
- -### Authors -* Arindam Datta (@dattaarindam) - --------------------------------- -# Filesystem Snapshot Module - -Manage Filesystem Snapshots for PowerStore - -### Synopsis - Supports the provisioning operations on a filesystem snapshot such as create, modify, delete and get the details of a filesystem snapshot. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
snapshot_name str
The name of the filesystem snapshot.
Mandatory for create operation.
Specify either snapshot name or ID (but not both) for any operation.
snapshot_id str
The ID of the Snapshot.
filesystem str
The ID/Name of the filesystem for which snapshot will be taken.
If filesystem name is specified, then nas_server is required to uniquely identify the filesystem.
Mandatory for create operation.
nas_server str
The NAS server, this could be the name or ID of the NAS server.
description str
The description for the filesystem snapshot.
desired_retention int
The retention value for the Snapshot.
If the desired_retention/expiration_timestamp is not mentioned during creation, snapshot will be created with unlimited retention.
Maximum supported desired retention is 31 days.
retention_unit str hours
  • hours
  • days

The unit for retention.
expiration_timestamp str
The expiration timestamp of the snapshot. This should be provided in UTC format, e.g 2020-07-24T10:54:54Z.
To remove the expiration timestamp, specify it as an empty string.
access_type str
  • SNAPSHOT
  • PROTOCOL

Specifies whether the snapshot directory or protocol access is granted to the filesystem snapshot.
For create operation, if access_type is not specified, snapshot will be created with 'SNAPSHOT' access type.
state str True
  • absent
  • present

Define whether the filesystem snapshot should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create filesystem snapshot - dellemc.powerstore.filesystem_snapshot: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "sample_filesystem_snapshot" - nas_server: "ansible_nas_server" - filesystem: "sample_filesystem" - desired_retention: 20 - retention_unit: "days" - state: "present" - -- name: Get the details of filesystem snapshot - dellemc.powerstore.filesystem_snapshot: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_id: "{{fs_snapshot_id}}" - state: "present" - -- name: Delete filesystem snapshot - dellemc.powerstore.filesystem_snapshot: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_id: "{{fs_snapshot_id}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
create_fs_snap bool always Whether or not the resource has created.
delete_fs_snap bool always Whether or not the resource has deleted.
filesystem_snap_details dict When snapshot exists. Details of the snapshot.
  access_type str success Displays the type of access allowed to the snapshot.
  creation_timestamp str success The date and time the snapshot was created.
  description str success Description of the filesystem snapshot.
  expiration_timestamp str success The date and time the snapshot is due to be automatically deleted by the system.
  id str success Unique identifier of the filesystem snapshot instance.
  name str success The name of the snapshot.
  nas_server dict success Details of NAS server on which snapshot is present.
   id str success ID of the NAS server.
   name str success Name of the NAS server
  parent_id str success ID of the filesystem on which snapshot is taken.
  parent_name str success Name of the filesystem on which snapshot is taken.
modify_fs_snap bool always Whether or not the resource has modified.
- -### Authors -* Akash Shendge (@shenda1) - --------------------------------- -# Host Module - -Manage host on PowerStore storage system - -### Synopsis - Managing host on PowerStore storage system includes create host with a set of initiators, add/remove initiators from host, rename host and delete host. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
host_name str
The host name. This value must contain 128 or fewer printable Unicode characters.
Creation of an empty host is not allowed.
Required when creating a host.
Use either host_id or host_name for modify and delete tasks.
host_id str
The 36 character long host id automatically generated when a host is created.
Use either host_id or host_name for modify and delete tasks.
The host_id cannot be used while creating host, as it is generated by the array after creation of host.
os_type str
  • Windows
  • Linux
  • ESXi
  • AIX
  • HP-UX
  • Solaris

Operating system of the host.
Required when creating a host.
OS type cannot be modified for a given host.
initiators list
elements: str

List of Initiator WWN or IQN or NQN to be added or removed from the host.
Subordinate initiators in a host can only be of one type, either FC or iSCSI.
Required when creating a host.
It is mutually exclusive with detailed_initiators.
detailed_initiators list
elements: dict

Initiator properties.
It is mutually exclusive with initiators.
  port_name str True
Name of port type.
The port_name is mandatory key.
  port_type str
  • iSCSI
  • FC
  • NVMe

Protocol type of the host initiator.
  chap_single_username str
Username for single CHAP authentication.
CHAP username is required when the cluster CHAP mode is mutual authentication.
Minimum length is 1 and maximum length is 64 characters.
  chap_single_password str
Password for single CHAP authentication.
CHAP password is required when the cluster CHAP mode is mutual authentication.
Minimum length is 12 and maximum length is 64 characters.
  chap_mutual_username str
Username for mutual CHAP authentication.
CHAP username is required when the cluster CHAP mode is mutual authentication.
Minimum length is 1 and maximum length is 64 characters.
  chap_mutual_password str
Password for mutual CHAP authentication.
CHAP password is required when the cluster CHAP mode is mutual authentication.
Minimum length is 12 and maximum length is 64 characters.
state str True
  • absent
  • present

Define whether the host should exist or not.
Value present - indicates that the host should exist in system.
Value absent - indicates that the host should not exist in system.
initiator_state str
  • present-in-host
  • absent-in-host

Define whether the initiators should be present or absent in host.
Value present-in-host - indicates that the initiators should exist on host.
Value absent-in-host - indicates that the initiators should not exist on host.
Required when creating a host with initiators or adding/removing initiators to/from existing host.
new_name str
The new name of host for renaming function. This value must contain 128 or fewer printable Unicode characters.
Cannot be specified when creating a host.
host_connectivity str
  • Local_Only
  • Metro_Optimize_Both
  • Metro_Optimize_Local
  • Metro_Optimize_Remote

Connectivity type for host.
If any of metro connectivity options specified, a metro host must exists in both cluster provide connectivity to a metro volume from both cluster.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Only completely and correctly configured iSCSI initiators can be associated with a host. -* The parameters initiators and detailed_initiators are mutually exclusive. -* For mutual CHAP authentication, single CHAP credentials are mandatory. -* Support of NVMe type of initiators is for PowerStore 2.0 and beyond. -* The host_connectivity is supported only in PowerStore 3.0.0.0 and above. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Create host with iSCSI initiator and its details - dellemc.powerstore.host: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - host_name: "ansible-test-host-2" - os_type: 'Windows' - detailed_initiators: - - port_name: 'iqn.1998-01.com.vmware:lgc198248-5b06fb37' - port_type: 'iSCSI' - chap_single_username: 'chapuserSingle' - chap_single_password: 'chappasswd12345' - state: 'present' - initiator_state: 'present-in-host' - - - name: Get host details by name - dellemc.powerstore.host: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - host_name: "ansible-test-host-1" - state: 'present' - - - name: Add initiators to host by name - dellemc.powerstore.host: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - host_name: "ansible-test-host-1" - initiators: - - 21:00:00:24:ff:31:e9:ee - initiator_state: 'present-in-host' - state: 'present' - - - name: Delete host - dellemc.powerstore.host: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - host_name: "ansible-test-host-1-new" - state: 'absent' -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
host_details complex When host exists Details of the host.
  description str success Description about the host.
  host_connectivity str success Connectivity type for host. It was added in 3.0.0.0.
  host_group_id str success The host group ID of host.
  host_initiators complex success The initiator details of this host.
   active_sessions list success List of active login sessions between an initiator and a target port.
   chap_mutual_username str success Username for mutual CHAP authentication.
   chap_single_username str success Username for single CHAP authentication.
   port_name str success Name of the port.
   port_type str success The type of the port.
  id str success The system generated ID given to the host.
  mapped_hosts complex success This is the inverse of the resource type host_volume_mapping association.
   host_group dict success Details about a host group to which host is mapped.
    id str success ID of the host group.
    name str success Name of the host group.
   id str success Unique identifier of a mapping between a host and a volume.
   logical_unit_number int success Logical unit number for the host volume access.
   volume dict success Details about a volume which has mapping with the host.
    id str success ID of the volume.
    name str success Name of the volume.
  name str success Name of the host.
  os_type str success The os type of the host.
  type str success Type of the host.
- -### Authors -* Manisha Agrawal (@agrawm3) - --------------------------------- -# Host Group Module - -Manage host group on PowerStore Storage System - -### Synopsis - Managing host group on PowerStore storage system includes create host group with a set of hosts, add/remove hosts from host group, rename host group, and delete host group. - Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
hostgroup_name str
The host group name. This value must contain 128 or fewer printable Unicode characters.
Creation of an empty host group is not allowed.
Required when creating a host group.
Use either hostgroup_id or hostgroup_name for modify and delete tasks.
hostgroup_id str
The 36-character long host group id, automatically generated when a host group is created.
Use either hostgroup_id or hostgroup_name for modify and delete tasks.
The hostgroup_id cannot be used while creating host group, as it is generated by the array after creation of host group.
hosts list
elements: str

List of hosts to be added or removed from the host group.
Subordinate hosts in a host group can only be of one type, either FC or iSCSI.
Required when creating a host group.
To represent host, both name or ID can be used interchangeably. The module will detect both.
state str True
  • absent
  • present

Define whether the host group should exist or not.
Value present - indicates that the host group should exist on the system.
Value absent - indicates that the host group should not exist on the system.
Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them.
host_state str
  • present-in-group
  • absent-in-group

Define whether the hosts should be present or absent in host group.
Value present-in-group - indicates that the hosts should exist on the host group.
Value absent-in-group - indicates that the hosts should not exist on the host group.
Required when creating a host group with hosts or adding/removing hosts from existing host group.
new_name str
The new name for host group renaming function. This value must contain 128 or fewer printable Unicode characters.
host_connectivity str
  • Local_Only
  • Metro_Optimize_Both
  • Metro_Optimize_Local
  • Metro_Optimize_Remote

Connectivity type for host group.
If any of metro connectivity options specified, a metro host group must exists in both cluster provide connectivity to a metro volume from both cluster.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* The host_connectivity is supported only PowerStore 3.0.0.0 and above. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Create host group with hosts - dellemc.powerstore.hostgroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - hostgroup_name: "{{hostgroup_name}}" - hosts: - - host1 - - c17fc987-bf82-480c-af31-9307b89923c3 - state: 'present' - host_state: 'present-in-group' - - - name: Get host group details - dellemc.powerstore.hostgroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - hostgroup_name: "{{hostgroup_name}}" - state: 'present' - - - name: Add hosts to host group - dellemc.powerstore.hostgroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - hostgroup_name: "{{hostgroup_name}}" - hosts: - - host3 - host_state: 'present-in-group' - state: 'present' - - - name: Delete host group - dellemc.powerstore.hostgroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - hostgroup_name: "{{hostgroup_name}}" - state: 'absent' -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
hostgroup_details complex When host group exists Details of the host group.
  description str success Description about the host group.
  host_connectivity str success Connectivity type for host group. It was added in 3.0.0.0.
  hosts complex success The hosts details which are part of this host group.
   id str success The ID of the host.
   name str success The name of the host.
  id str success The system generated ID given to the host group.
  name str success Name of the host group.
- -### Authors -* Manisha Agrawal (@agrawm3) - --------------------------------- -# Info Module - -Gathers information about PowerStore Storage entities - -### Synopsis - Gathers the list of specified PowerStore Storage System entities, includes block/file provisioning modules, replication modules and configuration modules. - Block provisioning module includes volumes, volume groups, hosts, host groups, snapshot rules, protection policies. - File provisioning module includes NAS servers, NFS exports, SMB shares, tree quotas, user quotas, file systems. - Replication module includes replication rules, replication sessions, remote system. - Configuration module includes cluster nodes, network, roles, local users, appliances, security configs, certificates, AD/LDAP servers, LDAP accounts, LDAP domain. - It also includes DNS/NTP servers, smtp configs, email destinations, remote support, remote support contacts. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
gather_subset list
elements: str
True
  • vol
  • vg
  • host
  • hg
  • node
  • protection_policy
  • snapshot_rule
  • nas_server
  • nfs_export
  • smb_share
  • tree_quota
  • user_quota
  • file_system
  • replication_rule
  • replication_session
  • remote_system
  • network
  • role
  • ldap_account
  • user
  • appliance
  • ad
  • ldap
  • security_config
  • certificate
  • dns
  • ntp
  • smtp_config
  • email_notification
  • remote_support
  • remote_support_contact
  • ldap_domain

A list of string variables which specify the PowerStore system entities requiring information.
Volumes - vol.
All the nodes - node.
Volume groups - vg.
Protection policies - protection_policy.
Hosts - host.
Host groups - hg.
Snapshot rules - snapshot_rule.
NAS servers - nas_server.
NFS exports - nfs_export.
SMB shares - smb_share.
Tree quotas - tree_quota.
User quotas - user_quota.
File systems - file_system.
Replication rules - replication_rule.
Replication sessions - replication_session.
Remote systems - remote_system.
Various networks - network.
Roles - role.
Local users - user.
Appliances - appliance.
Security configurations - security_config.
Certificates - certificate.
Active directories - ad.
LDAPs - ldap.
DNS servers - dns.
NTP servers - ntp.
Email notification destinations - email_notification.
SMTP configurations - smtp_config.
Remote Support - remote_support.
Remote support contacts - remote_support_contact.
LDAP accounts - ldap_account.
LDAP domain - ldap_domain.
filters list
elements: dict

A list of filters to support filtered output for storage entities.
Each filter is a list of filter_key, filter_operator, filter_value.
Supports passing of multiple filters.
  filter_key str True
Name identifier of the filter.
  filter_operator str True
  • equal
  • greater
  • lesser
  • like
  • notequal

Operation to be performed on the filter key.
  filter_value str True
Value of the filter key.
all_pages bool False
Indicates whether to return all available entities on the storage system.
If set to True, the Info module will implement pagination and return all entities. Otherwise, a maximum of the first 100 entities of any type will be returned.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Pagination is not supported for role, local user, security configs, LDAP accounts and LDAP domain. If all_pages is passed, it will be ignored. -* The check_mode is supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get list of different attributes - dellemc.powerstore.info: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - gather_subset: - - vol - - vg - - host - - hg - - node - - tree_quota - - user_quota - - file_system - - replication_rule - - replication_session - - remote_system - - protection_policy - - snapshot_rule - - nas_server - - nfs_export - - smb_share - - user - - role - - network - - appliance - - dns - - email_notification - - ntp - - remote_support - - remote_support_contact - - smtp_config - - ad - - ldap - - certificate - - security_config - - ldap_account - - ldap_domain - -- name: Get list of volumes whose state notequal to ready - dellemc.powerstore.info: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - gather_subset: - - vol - filters: - - filter_key: "state" - filter_operator: "notequal" - filter_value: "ready" - -- name: Get list of snapshot rules whose desired_retention between 101-499 and name contains 'share' - dellemc.powerstore.info: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - gather_subset: - - snapshot_rule - filters: - - filter_key: "desired_retention" - filter_operator: "greater" - filter_value: "100" - - filter_key: "desired_retention" - filter_operator: "lesser" - filter_value: "500" - - filter_key: "name" - filter_operator: "like" - filter_value: "*share*" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
ActiveDirectory list When ad is in a given gather_subset Provides details of all active directories.
  id str success ID of the active directory.
Appliance list When appliance is in a given gather_subset Provides details of all appliances.
  id str success ID of the appliance.
  model str success Model type of the PowerStore.
  name str success Name of the appliance.
Array_Software_Version str always API version of PowerStore array.
Certificate list When certificates is in a given gather_subset Provides details of all certificates.
  id str success ID of the certificate.
Cluster list always Provides details of all clusters.
  id str success ID of the cluster.
  name str success Name of the cluster.
DNS list When dns is in a given gather_subset Provides details of all DNS servers.
  id str success ID of the DNS server.
EmailNotification list When email_notification is in a given gather_subset Provides details of all emails to which notifications will be sent.
  email_address str success Email address.
  id str success ID of the email.
FileSystems list When file_system is in a given gather_subset Provides details of all filesystems.
  id str success ID of the filesystem.
  name str success Name of the filesystem.
HostGroups list When hg is in a given gather_subset Provides details of all host groups.
  id str success ID of the host group.
  name str success Name of the host group.
Hosts list When host is in a given gather_subset Provides details of all hosts.
  id str success ID of the host.
  name str success Name of the host.
LDAP list When ldap is in a given gather_subset Provides details of all LDAPs.
  id str success ID of the LDAP.
LDAPAccounts list When LDAP account is in a given gather_subset Provides details of all LDAP accounts.
  dn str success Types of directory service protocol.
  domain_id int success Unique identifier of the LDAP domain to which LDAP user or group belongs.
  id str success ID of the LDAP account.
  name str success Name of the LDAP account.
  role_id int success Unique identifier of the role to which the LDAP account is mapped.
  type str success Type of LDAP account.
LDAPDomain list When LDAP domain configuration is in a given gather_subset Provides details of the LDAP domain configurations.
  bind_user str success Distinguished Name (DN) of the user to be used when binding.
  domain_name str success Name of the LDAP authority to construct the LDAP server configuration.
  group_member_attribute str success Name of the LDAP attribute whose value contains the names of group members within a group.
  group_name_attribute str success Name of the LDAP attribute whose value indicates the group name.
  group_object_class str success LDAP object class for groups.
  group_search_level int success Nested search level for performing group search.
  group_search_path str success Path used to search for groups on the directory server.
  id str success Unique identifier of the new LDAP server configuration.
  is_global_catalog bool success Whether or not the catalog is global. Default value is false.
  ldap_server_type str success Types of LDAP server.
  ldap_server_type_l10n str success Localized message string corresponding to ldap_server_type.
  ldap_servers list success List of IP addresses of the LDAP servers for the domain. IP addresses are in IPv4 format.
  ldap_timeout int success Timeout for establishing a connection to an LDAP server. Default value is 30000 (30 seconds).
  port int success Port number used to connect to the LDAP server(s).
  protocol str success Types of directory service protocol.
  protocol_l10n str success Localized message string corresponding to protocol.
  user_id_attribute str success Name of the LDAP attribute whose value indicates the unique identifier of the user.
  user_object_class str success LDAP object class for users.
  user_search_path str success Path used to search for users on the directory server.
LocalUsers list When user is in a given gather_subset Provides details of all local users.
  id str success ID of the user.
  name str success Name of the user.
NASServers list When nas_server is in a given gather_subset Provides details of all nas servers.
  id str success ID of the nas server.
  name str success Name of the nas server.
NFSExports list When nfs_export is in a given gather_subset Provides details of all nfs exports.
  id str success ID of the nfs export.
  name str success Name of the nfs export.
NTP list When ntp is in a given gather_subset Provides details of all NTP servers.
  id str success ID of the NTP server.
Networks list When network is in a given gather_subset Provides details of all networks.
  id str success ID of the network.
  name str success Name of the network.
Nodes list When a node is in a given gather_subset Provides details of all nodes.
  id str success ID of the node.
  name str success Name of the node.
ProtectionPolicies list When protection_policy is in a given gather_subset Provides details of all protection policies.
  id str success ID of the protection policy.
  name str success Name of the protection policy.
RemoteSupport list When remote_support is in a given gather_subset Provides details of all remote support config.
  id str success ID of the remote support.
RemoteSupportContact list When remote_support_contact is in a given gather_subset Provides details of all remote support contacts.
  id str success ID of the remote support contact.
RemoteSystems list When remote_system is in a given gather_subset Provides details of all remote systems.
  id str success ID of the remote system.
  name str success Name of the remote system.
ReplicationRules list When replication_rule is in a given gather_subset Provides details of all replication rules.
  id str success ID of the replication rule.
  name str success Name of the replication rule.
ReplicationSession list when replication_session given in gather_subset Details of all replication sessions.
  id str success ID of the replication session.
Roles list When role is in a given gather_subset Provides details of all roles.
  id str success ID of the role.
  name str success Name of the role.
SMBShares list When smb_share is in a given gather_subset Provides details of all smb shares.
  id str success ID of the smb share.
  name str success name of the smb share.
SMTPConfig list When smtp_config is in a given gather_subset Provides details of all smtp config.
  id str success ID of the smtp config.
SecurityConfig list When security_config is in a given gather_subset Provides details of all security configs.
  id str success ID of the security config.
SnapshotRules list When snapshot_rule is in a given gather_subset Provides details of all snapshot rules.
  id str success ID of the snapshot rule.
  name str success Name of the snapshot rule.
TreeQuotas list When tree_quota is in a given gather_subset Provides details of all tree quotas.
  id str success ID of the tree quota.
  path str success Path of the tree quota.
UserQuotas list When user_quota is in a given gather_subset Provides details of all user quotas.
  id str success ID of the user quota.
VolumeGroups list When vg is in a given gather_subset Provides details of all volume groups.
  id str success ID of the volume group.
  name str success Name of the volume group.
Volumes list When vol is in a given gather_subset Provides details of all volumes.
  id str success ID of the volume.
  name str success Name of the volume.
changed bool always Shows whether or not the resource has changed.
- -### Authors -* Arindam Datta (@dattaarindam) -* Vivek Soni (@v-soni11) -* Akash Shendge (@shenda1) - --------------------------------- -# Job Module - -Manage jobs for PowerStore - -### Synopsis - Managing jobs on PowerStore Storage System includes getting details of job. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
job_id str True
The ID of the job.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. - -### Examples -``` -- name: Get Job Details - dellemc.powerstore.job: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - job_id: "a544981c-e94a-40ab-9eae-e578e182d2bb" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
job_details complex When job exists. The job details.
  description_l10n str success Description of the job.
  end_time str success Date and time when the job execution completed.
  estimated_completion_time str success Estimated completion date and time.
  id str success Unique identifier of the job.
  parent_id str success Unique identifier of the parent job, if applicable.
  phase str success Current status of the job.
  progress_percentage int success Percent complete of the job.
  resource_action str success User-specified action to be performed on the given resource.
  resource_id str success Unique identifier of the resource on which the job is operating.
  resource_name str success Name of the resource on which the job is operating.
  resource_type str success Resource Type for the given resource.
  response_body complex success Base response object.
   messages complex success The details of the error response.
    arguments list success Values involved in the error.
    code str success Hexadecimal code of the error.
    message_l10n str success The description of the error.
    severity str success Type of the severity.
   response_type str success Job error response.
  response_status str success Possible HTTP status values of completed or failed jobs.
  root_id str success Unique identifier of the root job, if applicable. The root job is the job at the top of the parent hierarchy.
  start_time str success Date and time when the job execution started.
  state str success Current status of the job.
  step_order int success Order of a given job step with respect to its siblings within the job hierarchy.
  user str success Name of the user associated with the job.
- -### Authors -* Akash Shendge (@shenda1) - --------------------------------- -# LDAP Account Module - -Manage LDAP Account for PowerStore - -### Synopsis - Managing LDAP accounts on PowerStore Storage System includes creating an LDAP account, getting details of LDAP accounts, modifying an LDAP account, and deleting an LDAP account. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
ldap_account_id int
Unique identifier of the LDAP account.
ldap_account_name str
Name of the new LDAP account to be created.
This has to match to the LDAP user or group in LDAP server to which the LDAP account is mapped.
ldap_domain_id int
Unique identifier of the LDAP domain to which LDAP user or group belongs.
ldap_domain_name str
Name of the LDAP domain to which LDAP user or group belongs.
role_id int
Unique identifier of the role to which the new LDAP account will be mapped.
role_name str
Name of the role to which the new LDAP account will be mapped.
ldap_account_type str
  • User
  • Group

Type of LDAP account.
state str True
  • absent
  • present

Define whether the LDAP account should exist or not.
For Delete operation only, it should be set to "absent".
For all other operations except delete, it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create an LDAP account - dellemc.powerstore.ldap_account: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_account_name: "ldap_user_account_1" - ldap_domain_id: "1" - role_name: "Administrator" - ldap_account_type: "User" - state: "present" - -- name: Get the details of the LDAP account by name - dellemc.powerstore.ldap_account: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_account_name: "ldap_user_account_1" - state: "present" - -- name: Delete an LDAP account - dellemc.powerstore.ldap_account: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_account_id: "3" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
ldap_account_details complex When LDAP account exists. Details of the LDAP account.
  dn str success Types of directory service protocol.
  domain_id int success Unique identifier of the LDAP domain to which LDAP user or group belongs.
  id int success Unique identifier of the LDAP account.
  name str success Name of the LDAP account.
  role_id int success Unique identifier of the role to which the LDAP account is mapped.
  type str success Type of LDAP account.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# LDAP Domain Module - -Manage LDAP domain for PowerStore - -### Synopsis - Managing LDAP domain on PowerStore Storage System includes creating LDAP domain, getting details of LDAP domain, modifying LDAP domain, verifying LDAP domain and deleting LDAP domain. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
ldap_domain_name str
Name of the LDAP authority to construct the LDAP server configuration.
Mandatory for the create operation.
ldap_domain_id int
Unique identifier of the LDAP domain configuration.
ldap_servers list
elements: str

List of IP addresses of the LDAP servers for the domain.
ldap_server_state str
  • present-in-domain
  • absent-in-domain

State of the LDAP server.
The ldap_servers and ldap_server_state are required together.
ldap_server_port int
Port number used to connect to the LDAP Server.
protocol str
  • LDAP
  • LDAPS

Types of directory service protocol.
ldap_server_type str
  • AD
  • OpenLDAP

Types of the LDAP server.
bind_user str
Distinguished Name (DN) of the user to be used when binding; that is, authenticating and setting up the connection to the LDAP server.
Mandatory for the create operation.
bind_password str
Password to use when binding a new LDAP session.
Mandatory for the create operation.
ldap_timeout int
Timeout for establishing a connection to an LDAP server.
is_global_catalog bool
Whether or not the catalog is global.
ldap_domain_user_settings dict
User settings of LDAP domain.
  user_id_attribute str
Name of the LDAP attribute whose value indicates the unique identifier of the user.
Default value is sAMAccountName.
  user_object_class str
LDAP object class for users.
Default value is user.
  user_search_path str
Path used to search for users on the directory server.
Search path is empty, if global catalog is enabled.
ldap_domain_group_settings dict
Group settings of LDAP domain.
  group_name_attribute str
Name of the LDAP attribute whose value indicates the group name.
Default value is cn.
  group_member_attribute str
Name of the LDAP attribute whose value contains the names of group members within a group.
Default value is member.
  group_object_class str
LDAP object class for groups.
Default value is group.
  group_search_path str
Path used to search for groups on the directory server.
Search path is empty, if global catalog is enabled.
  group_search_level int
Nested search level for performing group search.
Default value is 0.
verify_configuration bool False
Indicates whether to perform the verify LDAP domain configuration or not.
state str True
  • absent
  • present

Define whether the LDAP domain configuration should exist or not.
For Delete operation only, it should be set to "absent".
For all other operations except delete, it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The 'is_global_catalog' option can be enabled only for AD server type. -* To use LDAPS protocol, the pre-requisite is to upload the certificate of LDAP server on PowerStore array. -* Verify operation does not support idempotency. -* The check_mode is supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get LDAP domain details using ID - dellemc.powerstore.ldap_domain: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_domain_id: 4 - state: "present" - -- name: Create LDAP domain with AD server type - dellemc.powerstore.ldap_domain: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_domain_name: "{{domain_name}}" - ldap_servers: - - "10.xxx.xx.xx" - ldap_server_state: "present-in-domain" - ldap_server_type: "AD" - bind_user: "{{bind_user}}" - bind_password: "{{bind_password}}" - is_global_catalog: True - ldap_server_port: 3268 - protocol: "LDAP" - ldap_domain_user_settings: - user_search_path: "" - ldap_domain_group_settings: - group_search_path: "" - state: "present" - -- name: Delete LDAP domain using domain name - dellemc.powerstore.ldap_domain: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - ldap_domain_name: "{{domain_name}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
ldap_domain_details complex When LDAP domain configuration exists. Details of the LDAP domain configuration.
  bind_user str success Distinguished Name (DN) of the user to be used when binding.
  domain_name str success Name of the LDAP authority to construct the LDAP server configuration.
  group_member_attribute str success Name of the LDAP attribute whose value contains the names of group members within a group.
  group_name_attribute str success Name of the LDAP attribute whose value indicates the group name.
  group_object_class str success LDAP object class for groups.
  group_search_level int success Nested search level for performing group search.
  group_search_path str success Path used to search for groups on the directory server.
  id str success Unique identifier of the new LDAP server configuration.
  is_global_catalog bool success Whether or not the catalog is global. Default value is false.
  ldap_server_type str success Types of LDAP server.
  ldap_server_type_l10n str success Localized message string corresponding to ldap_server_type.
  ldap_servers list success List of IP addresses of the LDAP servers for the domain. IP addresses are in IPv4 format.
  ldap_timeout int success Timeout for establishing a connection to an LDAP server. Default value is 30000 (30 seconds).
  port int success Port number used to connect to the LDAP server(s).
  protocol str success Types of directory service protocol.
  protocol_l10n str success Localized message string corresponding to protocol.
  user_id_attribute str success Name of the LDAP attribute whose value indicates the unique identifier of the user.
  user_object_class str success LDAP object class for users.
  user_search_path str success Path used to search for users on the directory server.
- -### Authors -* Akash Shendge (@shenda1) - --------------------------------- -# Local User Module - -Local user operations for PowerStore Storage System - -### Synopsis - Supports the provisioning operations on a Local user such as create, modify, delete and get the details of a local user. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
user_name str
Name of the local user account. Mutually exclusive with user_id.
Mandatory only for create operation.
user_id str
Unique identifier of the local user account.
Mutually exclusive with user_name.
user_password str
Password for the new local user account to be created.
Mandatory only for create operation.
new_password str
New password for the existing local user account.
role_name str
The name of the role to which the local user account will be mapped.
It is mutually exclusive with role_id.
role_id int
The unique identifier of the role to which the local user account will be mapped.
It is mutually exclusive with role_name.
is_locked bool
Whether the user account is locked or not.
Defaults to false at creation time.
state str True
  • absent
  • present

Define whether the local user should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create local user - dellemc.powerstore.local_user: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - user_name: "ansible_user_1" - user_password: "Password123#" - role_name: "role_1" - is_locked: False - state: "present" - -- name: Get the details local user with user name - dellemc.powerstore.local_user: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - user_name: "ansible_user_1" - state: "present" - -- name: Delete local user - dellemc.powerstore.local_user: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - user_name: "ansible_user_1" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
local_user_details complex When local user exists Details of the local user.
  id str success The system generated ID given to the local user.
  is_built_in bool success Whether the user account is built-in or not.
  is_default_password bool success Whether the user account has a default password or not. Only applies to default user accounts
  is_locked bool success Whether the user account is locked or not. Defaults to false at creation time.
  name str success Name of the local user.
  role_id str success Unique identifier of the role local user account is mapped to.
  role_name str success Name of the role to which local user account is mapped.
- -### Authors -* Arindam Datta (@dattaarindam) - --------------------------------- -# NAS Server Module - -NAS Server operations for PowerStore Storage system - -### Synopsis - Supports getting the details and modifying the attributes of a NAS server. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
nas_server_name str
Name of the NAS server. Mutually exclusive with nas_server_id.
nas_server_id str
Unique id of the NAS server. Mutually exclusive with nas_server_name.
description str
Description of the NAS server.
nas_server_new_name str
New name of the NAS server for a rename operation.
current_node str
Unique identifier or name of the node on which the NAS server is running.
preferred_node str
Unique identifier or name of the preferred node for the NAS server. The initial value (on NAS server create) is taken from the current node.
current_unix_directory_service str
  • NIS
  • LDAP
  • LOCAL_FILES
  • LOCAL_THEN_NIS
  • LOCAL_THEN_LDAP

Define the Unix directory service used for looking up identity information for Unix such as UIDs, GIDs, net groups, and so on.
default_unix_user str
Default Unix user name used for granting access in case of Windows to Unix user mapping failure. When empty, access in such case is denied.
default_windows_user str
Default Windows user name used for granting access in case of Unix to Windows user mapping failure. When empty, access in such case is denied.
protection_policy str
Name/ID of the protection policy applied to the nas server.
Policy can be removed by passing an empty string in the protection_policy parameter.
state str True
  • absent
  • present

Define whether the nas server should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Adding/Removing protection policy to/from a NAS server is supported for PowerStore version 3.0.0 and above. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of NAS Server by name - dellemc.powerstore.nasserver: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nas_server_name: "{{nas_server_name}}" - state: "present" - - - name: Modify NAS Server attributes by ID - dellemc.powerstore.nasserver: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nas_server_id: "{{nas_id}}" - current_unix_directory_service: "LOCAL_FILES" - current_node: "{{cur_node_n1}}" - preferred_node: "{{prefered_node}}" - protection_policy: "protection_policy_1" - state: "present" - - - name: Remove protection policy - dellemc.powerstore.nasserver: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nas_server_id: "{{nas_id}}" - protection_policy: "" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
nasserver_details complex When nas server exists Details about the nas server.
  backup_IPv4_interface_id str success Unique identifier of the preferred IPv4 backup interface.
  backup_IPv6_interface_id str success Unique identifier of the preferred IPv6 backup interface.
  current_node dict success Unique identifier and name of the node on which the NAS server is running.
  current_unix_directory_service str success Define the Unix directory service used for looking up identity information for Unix such as UIDs, GIDs, net groups, and so on.
  default_unix_user str success Default Unix user name used for granting access in case of Windows to Unix user mapping failure.
  description str success Additional information about the nas server.
  file_interfaces dict success This is the inverse of the resource type file_interface association. Will return the id,name & ip_address of the associated file interface.
  file_ldaps str success This is the inverse of the resource type file_ldap association.
  file_systems dict success This is the inverse of the resource type file_system association.
  id str success The system generated ID given to the nas server.
  is_username_translation_enabled bool success Enable the possibility to match a windows account to a Unix account with different names.
  name str success Name of the nas server.
  nfs_servers str success This is the inverse of the resource type nfs_server association.
  operational_status str success NAS server operational status.
  preferred_node dict success Unique identifier and name of the preferred node for the NAS server.
  production_IPv4_interface_id str success Unique identifier of the preferred IPv4 production interface.
  production_IPv6_interface_id str success Unique identifier of the preferred IPv6 production interface.
  protection_policy_id str success Id of the protection policy applied to the nas server.
  smb_servers str success This is the inverse of the resource type smb_server association.
- -### Authors -* Arindam Datta (@dattaarindam) - --------------------------------- -# Network Module - -Manage networks for PowerStore - -### Synopsis - Managing networks on PowerStore Storage System includes getting details of network, modifying attributes of network and adding/removing IP ports to/from storage network. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
network_name str
The name of the network.
This parameter is added in 2.0.0.0.
Specify either network_name or network_id for any operation.
network_id str
The ID of the network.
vlan_id int
The ID of the VLAN.
gateway str
Network gateway in IPv4 format. IP version.
Specify empty string to remove the gateway.
prefix_length int
Network prefix length.
new_cluster_mgmt_address str
New cluster management IP address in IPv4 format.
storage_discovery_address str
New storage discovery IP address in IPv4 format.
Specify empty string to remove the storage discovery IP address.
mtu int
Maximum Transmission Unit (MTU) packet size set on network interfaces, in bytes.
new_name str
New name of the network.
addresses list
elements: dict

IP addresses to add/remove in IPv4 format.
  current_address str
Existing IPv4 address.
  new_address str
New IPv4 address.
ports list
elements: str

Ports to be mapped/unmapped to/from the storage network.
port_state str
  • present-in-network
  • absent-in-network

Specifies whether port should mapped/unmapped from the storage network.
vasa_provider_credentials dict
Credentials required for re-registering the VASA vendor provider during the reconfiguration of the cluster management IP address.
  username str True
VASA vendor provider user name.
  password str True
VASA vendor provider password.
esxi_credentials list
elements: dict

Credentials required for re-registering the ESXi hosts in the vCenter.
It should be passed only when ESXi host addresses or management network VLAN / prefix / gateway are changed during the reconfiguration of the PowerStore X model appliances.
This parameter is applicable only for PowerStore X model.
This parameter will be ignored if passed for PowerStore T model.
  node_id str True
Node identifier corresponding to the ESXi host.
  password str True
ESXi host root password.
wait_for_completion bool False
Flag to indicate if the operation should be run synchronously or asynchronously. True signifies synchronous execution. By default, modify operation will run asynchronously.
state str True
  • absent
  • present

Define whether the network exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* It is recommended to perform task asynchronously while changing cluster management address. -* Idempotency is not supported for vasa_provider_credentials and esxi_credentials. -* For PowerStore X model, vasa_provider_credentials has to be specified along with new_cluster_mgmt_address. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get network details using ID - dellemc.powerstore.network: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - network_id: "NW1" - state: "present" - -- name: Map port to the storage network - dellemc.powerstore.network: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - network_name: "Default Storage Network" - wait_for_completion: True - ports: - - "IP1" - port_state: "present-in-network" - state: "present" - -- name: Replace the IP's in the management network and re-register VASA vendor - provider for X model - dellemc.powerstore.network: - array_ip: "{{array_ip1}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - network_id: "NW1" - vlan_id: 0 - gateway: "100.231.x.x" - mtu: 1500 - prefix_length: 24 - addresses: - - current_address: "100.230.x.x" - new_address: "100.231.x.x" - - current_address: "100.230.x.x" - new_address: "100.231.x.x" - new_cluster_mgmt_address: "100.231.x.x" - vasa_provider_credentials: - username: "vmadmin" - password: "{{vm_password}}" - esxi_credentials: - - "node_id": "N1" - "password": "{{node_password}}" - - "node_id": "N2" - "password": "{{node_password}}" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
job_details complex When asynchronous task is performed. The job details.
  id str success The ID of the job.
network_details complex When network exists. The network details.
  cluster_details complex success The details of the cluster.
   appliance_count int success Number of appliances configured in this cluster.
   id str success The unique identifier of the cluster.
   management_address str success The floating management IP address for the cluster in IPv4 or IPv6 format.
   name str success The name of the cluster.
   storage_discovery_address str success The floating storage discovery IP address for the cluster in IPv4 or IPv6 format.
  gateway str success The gateway of the network.
  id str success The ID of the network.
  ip_version str success IP protocol version
  member_ips complex success Properties of the IP pool address.
   address str success IP address value, in IPv4 or IPv6 format.
   appliance_id str success Unique identifier of the appliance to which the IP address belongs.
   id str success Unique identifier of the IP address.
   ip_port_id str success Unique identifier of the port that uses this IP address to provide access to storage network services, such as iSCSI. This attribute can be set only for an IP address used by networks of type Storage.
   name str success Name of the IP address.
   network_id str success Unique identifier of the network to which the IP address belongs.
   node_id str success Unique identifier of the cluster node to which the IP address belongs.
   purposes list success IP address purposes.
  mtu int success Maximum Transmission Unit (MTU) packet size set on network interfaces, in bytes.
  name str success The name of the network.
  prefix_length int success Network prefix length.
  purposes list success Purposes of the network.
  type str success Network type
  vcenter_details complex success Details of the vcenter.
   address str success IP address of vCenter host, in IPv4, IPv6, or hostname format.
   id str success Unique identifier of the vCenter instance.
   instance_uuid str success UUID instance of the vCenter.
   username str success User name to login to vCenter.
   vendor_provider_status str success General status of the VASA vendor provider in vCenter.
  vlan_id int success VLAN identifier.
- -### Authors -* Akash Shendge (@shenda1) - --------------------------------- -# NFS Module - -Manage NFS exports for PowerStore - -### Synopsis - Managing NFS exports on PowerStore Storage System includes creating new NFS Export, getting details of NFS export, modifying attributes of NFS export, and deleting NFS export. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
nfs_export_name str
The name of the NFS export.
Mandatory for create operation.
Specify either nfs_export_name or nfs_export_id(but not both) for any operation.
nfs_export_id str
The ID of the NFS export.
filesystem str
The ID/Name of the filesystem for which the NFS export will be created.
Either filesystem or snapshot is required for creation of the NFS Export.
If filesystem name is specified, then nas_server is required to uniquely identify the filesystem.
If filesystem parameter is provided, then snapshot cannot be specified.
snapshot str
The ID/Name of the Snapshot for which NFS export will be created.
Either filesystem or snapshot is required for creation of the NFS Export.
If snapshot name is specified, then nas_server is required to uniquely identify the snapshot.
If snapshot parameter is provided, then filesystem cannot be specified.
NFS export can be created only if access type of snapshot is "protocol".
nas_server str
The NAS server. This could be the name or ID of the NAS server.
path str
Local path to export relative to the NAS server root.
With NFS, each export of a file_system or file_snap must have a unique local path.
Mandatory while creating NFS export.
description str
The description for the NFS export.
default_access str
  • NO_ACCESS
  • READ_ONLY
  • READ_WRITE
  • ROOT
  • READ_ONLY_ROOT

Default access level for all hosts that can access the Export.
For hosts that need different access than the default, they can be configured by adding to the list.
If default_access is not mentioned during creation, then NFS export will be created with No_Access.
no_access_hosts list
elements: str

Hosts with no access to the NFS export.
read_only_hosts list
elements: str

Hosts with read-only access to the NFS export.
read_only_root_hosts list
elements: str

Hosts with read-only access for root user to the NFS export.
read_write_hosts list
elements: str

Hosts with read and write access to the NFS export.
read_write_root_hosts list
elements: str

Hosts with read and write access for root user to the NFS export.
min_security str
  • SYS
  • KERBEROS
  • KERBEROS_WITH_INTEGRITY
  • KERBEROS_WITH_ENCRYPTION

NFS enforced security type for users accessing an NFS export.
If not specified at the time of creation, it will be set to SYS.
anonymous_uid int
Specifies the user ID of the anonymous account.
If not specified at the time of creation, it will be set to -2.
anonymous_gid int
Specifies the group ID of the anonymous account.
If not specified at the time of creation, it will be set to -2.
is_no_suid bool
If set, do not allow access to set SUID. Otherwise, allow access.
If not specified at the time of creation, it will be set to False.
host_state str
  • present-in-export
  • absent-in-export

Define whether the hosts can access the NFS export.
Required when adding or removing host access from the export.
state str True
  • absent
  • present

Define whether the NFS export should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create NFS export (filesystem) - dellemc.powerstore.nfs: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nfs_export_name: "{{export_name1}}" - filesystem: "{{filesystem}}" - nas_server: "{{nas_server}}" - path: "{{path1}}" - description: "sample description" - default_access: "NO_ACCESS" - no_access_hosts: - - "{{host5}}" - read_only_hosts: - - "{{host1}}" - read_only_root_hosts: - - "{{host2}}" - read_write_hosts: - - "{{host3}}" - read_write_root_hosts: - - "{{host4}}" - min_security: "SYS" - anonymous_uid: 1000 - anonymous_gid: 1000 - is_no_suid: True - host_state: "present-in-export" - state: "present" - -- name: Get NFS export details using ID - dellemc.powerstore.nfs: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nfs_export_id: "{{export_id}}" - state: "present" - -- name: Modify the attributes of NFS export, add Read-Only and Read-Write hosts to NFS export - dellemc.powerstore.nfs: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nfs_export_id: "{{export_id}}" - description: "modify description" - default_access: "ROOT" - read_only_hosts: - - "{{host5}}" - read_write_hosts: - - "{{host6}}" - host_state: "present-in-export" - state: "present" - -- name: Delete NFS export using name - dellemc.powerstore.nfs: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - nfs_export_name: "{{export_name}}" - nas_server: "{{nas_server}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
nfs_export_details complex When NFS export exists. The NFS export details.
  anonymous_GID int success The group ID of the anonymous account.
  anonymous_UID int success The user ID of the anonymous account.
  default_access str success Default access level for all hosts that can access the export.
  description str success The description for the NFS export.
  file_system complex success Details of filesystem and NAS server on which NFS export is present.
   filesystem_type str success The type of the filesystem.
   id str success The ID of the filesystem.
   name str success The name of the filesystem.
   nas_server complex success Details of NAS server.
    id str success The ID of the NAS server.
    name str success The name of the NAS server.
  id str success The ID of the NFS export.
  is_no_SUID bool success If set, do not allow access to set SUID. Otherwise, allow access.
  min_security str success NFS enforced security type for users accessing an NFS export.
  name str success The name of the NFS export.
  no_access_hosts list success Hosts with no access to the NFS export.
  path str success Local path to a location within the file system.
  read_only_hosts list success Hosts with read-only access to the NFS export.
  read_only_root_hosts list success Hosts with read-only for root user access to the NFS export.
  read_write_hosts list success Hosts with read and write access to the NFS export.
  read_write_root_hosts list success Hosts with read and write for root user access to the NFS export.
- -### Authors -* Akash Shendge (@shenda1) - --------------------------------- -# NTP Module - -NTP operations on a PowerStore storage system - -### Synopsis - Performs all NTP operations on a PowerStore Storage System. This module supports get details of an existing NTP instance. You can modify existing NTP instance with supported parameters. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
ntp_id str True
Unique identifier of the NTP instance.
ntp_addresses list
elements: str

NTP server addresses, may contain host names or IPv4 addresses.
ntp_address_state str
  • present-in-ntp
  • absent-in-ntp

State of the addresses mentioned in ntp_addresses.
state str True
  • present
  • absent

The state of the NTP instance after the task is performed.
For get and modify operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Minimum 1 and maximum 3 addresses can be associated to a NTP instance. -* Parameters ntp_addresses and ntp_address_state are required together. -* Creation and deletion of NTP is not supported. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of NTP instance - dellemc.powerstore.ntp: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - ntp_id: "NTP1" - state: "present" - - - name: Add addresses to NTP instance - dellemc.powerstore.ntp: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - ntp_id: "NTP1" - ntp_addresses: - - "XX.XX.XX.XX" - - "YY.YY.YY.YY" - ntp_address_state: "present-in-ntp" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Shows whether or not the resource has changed.
ntp_details complex When NTP exists. Details of the NTP instance.
  addresses str success NTP server addresses, may contain host names or IPv4 addresses.
  id str success Unique identifier of NTP instance.
- -### Authors -* Bhavneet Sharma (@sharmb5) - --------------------------------- -# Protection Policy Module - -Perform Protection policy operations for PowerStore storage system - -### Synopsis - Performs all protection policy operations on PowerStore Storage System. This module supports create, modify, get and delete a protection policy. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
name str
String variable. Indicates the name of the protection policy.
protectionpolicy_id str
String variable. Indicates the id of the protection policy.
new_name str
String variable. Indicates the new name of the protection policy.
Used for renaming operation.
snapshotrules list
elements: str

List of strings to specify the name or ids of snapshot rules which are to be added or removed, to or from, the protection policy.
replicationrule str
The name or ids of the replcation rule which is to be added to the protection policy.
To remove the replication rule, an empty string has to be passed.
description str
String variable. Indicates the description of the protection policy.
state str True
  • present
  • absent

String variable. Indicates the state of protection policy.
For Delete operation only, it should be set to "absent".
For all other operations like Create, Modify or Get details, it should be set to "present".
snapshotrule_state str
  • present-in-policy
  • absent-in-policy

String variable. Indicates the state of a snapshotrule in a protection policy.
When snapshot rules are specified, this variable is required.
Value present-in-policy indicates to add to protection policy.
Value absent-in-policy indicates to remove from protection policy.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Before deleting a protection policy, the replication rule has to be removed from the protection policy. -* In PowerStore version 3.0.0.0, protection policy without snapshot rule/replication rule is not allowed. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create a protection policy with snapshot rule and replication rule - dellemc.powerstore.protectionpolicy: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - description: "{{description}}" - snapshotrules: - - "Ansible_test_snap_rule_1" - replicationrule: "ansible_replication_rule_1" - snapshotrule_state: "present-in-policy" - state: "present" - -- name : Modify protection policy, add snapshot rule and remove replication rule - dellemc.powerstore.protectionpolicy: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - snapshotrules: - - "Ansible_test_snaprule_1" - snapshotrule_state: "present-in-policy" - replicationrule: "" - snapshotrule_state: "absent-in-policy" - state: "present" - -- name : Get details of protection policy by name - dellemc.powerstore.protectionpolicy: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - state: "present" - -- name : Delete protection policy - dellemc.powerstore.protectionpolicy: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
protectionpolicy_details complex When protection policy exists Details of the protection policy.
  description str success description about the protection policy.
  id str success The system generated ID given to the protection policy.
  name str success Name of the protection policy.
  replication_rules complex success The replication rule details of the protection policy.
   id str success The replication rule ID of the protection policy.
   name str success The replication rule name of the protection policy.
  snapshot_rules complex success The snapshot rules details of the protection policy.
   id str success The snapshot rule ID of the protection policy.
   name str success The snapshot rule name of the protection policy.
  type str success The type for the protection policy.
- -### Authors -* Arindam Datta (@dattaarindam) -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Quota Module - -Manage Tree Quotas and User Quotas on PowerStore - -### Synopsis - Managing Quotas on PowerStore storage system includes getting details, modifying, creating and deleting Quotas. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
path str
The path on which the quota will be imposed.
Path is relative to the root of the filesystem.
For user quota, if path is not specified, quota will be created at the root of the filesystem.
quota_type str
  • user
  • tree

The type of quota which will be imposed.
quota_id str
Id of the user/tree quota.
If quota_id is mentioned, then path/nas_server/file_system/quota_type is not required.
filesystem str
The ID/Name of the filesystem for which the Tree/User Quota will be created.
If filesystem name is specified, then nas_server is required to uniquely identify the filesystem.
nas_server str
The NAS server. This could be the name or ID of the NAS server.
description str
Additional information that can be mentioned for a Tree Quota.
Description parameter can only be used when quota_type is 'tree'.
unix_name str
The name of the unix user account for which quota operations will be performed.
Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'.
windows_name str
The name of the Windows User for which quota operations will be performed.
The name should be mentioned along with Domain Name as 'DOMAIN_NAME\user_name' or as "DOMAIN_NAME\\user_name".
Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'.
uid int
The ID of the unix user account for which quota operations will be performed.
Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'.
windows_sid str
The SID of the Windows User account for which quota operations will be performed.
Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'.
quota dict
Specifies Quota parameters.
  soft_limit int
Soft limit of the User/Tree quota.
No Soft limit when set to 0.
  hard_limit int
Hard limit of the user quota.
No hard limit when set to 0.
  cap_unit str GB
  • GB
  • TB

Unit of storage for the hard and soft limits.
This parameter is required if limit is specified.
state str True
  • absent
  • present

Define whether the Quota should exist or not.
Value present indicates that the Quota should exist on the system.
Value absent indicates that the Quota should not exist on the system.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Tree quota cannot be created at the root of the filesystem. -* When the ID of the filesystem is passed then nas_server is not required. If passed, then filesystem should exist for the nas_server, else the task will fail. -* If a primary directory of the current directory or a subordinate directory of the path is having a Tree Quota configured, then the quota for that path cannot be created. -* Hierarchical tree quotas are not allowed. -* When the first quota is created for a directory/user in a filesystem then the quotas will be enabled for that filesystem automatically. -* If a user quota is to be created on a tree quota, then the user quotas will be enabled automatically in a tree quota. -* Delete User Quota operation is not supported. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Create a Quota for a User using unix name - dellemc.powerstore.quota: - array_ip: "{{array_ip}}" - verifycert: "{{verify_cert}}" - user: "{{user}}" - password: "{{password}}" - quota_type: "user" - unix_name: "{{unix_name}}" - filesystem: "sample_fs" - nas_server: "{{nas_server_id}}" - quota: - soft_limit: 5 - hard_limit: 10 - cap_unit: "TB" - state: "present" - - - name: Modify attributes for Tree Quota - dellemc.powerstore.quota: - array_ip: "{{array_ip}}" - verifycert: "{{verify_cert}}" - user: "{{user}}" - password: "{{password}}" - quota_id: "{{quota_id}}" - quota: - soft_limit: 10 - hard_limit: 15 - cap_unit: "TB" - state: "present" - - - name: Get details of User Quota - dellemc.powerstore.quota: - array_ip: "{{array_ip}}" - verifycert: "{{verify_cert}}" - user: "{{user}}" - password: "{{password}}" - quota_type: "user" - uid: 100 - path: "/home" - filesystem: "{{filesystem_id}}" - state: "present" - - - name: Delete a Tree Quota - dellemc.powerstore.quota: - array_ip: "{{array_ip}}" - verifycert: "{{verify_cert}}" - user: "{{user}}" - password: "{{password}}" - quota_type: "tree" - path: "/home" - filesystem: "sample_fs" - nas_server: "sample_nas_server" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
quota_details complex When Quota exists. The quota details.
  description str success Additional information about the tree quota. Only applicable for Tree Quotas.
  file_system complex success Includes ID and Name of filesystem and nas server for which smb share exists.
   filesystem_type str success Type of filesystem.
   id str success ID of filesystem.
   name str success Name of filesystem.
   nas_server dict success nas_server of filesystem.
  hard_limit(cap_unit) int success Value of the Hard Limit imposed on the quota.
  id str success The ID of the Quota.
  remaining_grace_period int success The time period remaining after which the grace period will expire.
  size_used int success Size currently consumed by Tree/User on the filesystem.
  soft_limit(cap_unit) int success Value of the Soft Limit imposed on the quota.
  state str success State of the user quota or tree quota record period. OK means No quota limits are exceeded. Soft_Exceeded means Soft limit is exceeded, and grace period is not expired. Soft_Exceeded_And_Expired means Soft limit is exceeded, and grace period is expired. Hard_Reached means Hard limit is reached.
  state_l10n str success Localized message string corresponding to state.
  tree_quota_for_user_quota complex success Additional Information of Tree Quota limits on which user quota exists. Only applicable for User Quotas.
   description str success Description of Tree Quota for user quota.
   hard_limit(cap_unit) int success Value of the Hard Limit imposed on the quota.
   path str success The path on which the quota will be imposed.
  tree_quota_id str success ID of the Tree Quota on which the specific User Quota exists. Only applicable for user quotas.
  uid int success The ID of the unix host for which user quota exists. Only applicable for user quotas.
  unix_name str success The Name of the unix host for which user quota exists. Only applicable for user quotas.
  windows_name str success The Name of the Windows host for which user quota exists. Only applicable for user quotas.
  windows_sid str success The SID of the windows host for which user quota exists. Only applicable for user quotas.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Remote Support Module - -Remote Support operations on a PowerStore storage system - -### Synopsis - Performs all Remote Support operations on a PowerStore Storage System. This module supports getting details of an existing Remote Support configuration. - This module also supports modifying an existing Remote Support configuration. Verify a remote support configuration. You can send a test alert through the remote support configuration. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
remote_support_id int True
Unique identifier of the remote support configuration.
support_type str
  • SRS_Gateway
  • SRS_Gateway_Tier2
  • SRS_Gateway_Tier3
  • SRS_Integrated_Tier2
  • SRS_Integrated_Tier3
  • Disabled

The type of remote support that is configured.
Mandatory for modify and verify operation.
SRS_Gateway support_type is only supported for verify operation.
remote_support_servers list
elements: dict

One or two remote support servers.
  address str True
Gateway server IP address (IPv4).
The address is a mandatory key.
  port int
Gateway server port.
  is_primary bool
Indicates whether the server is acting as the primary.
One server must be set to false when two servers are configured.
server_state str
  • present-in-server
  • absent-in-server

Indicates the state of the remote-support_servers.
Required with remote_support_servers.
is_support_assist_license_accepted bool
Indicates whether user has accepted remote support license agreement before enabling the Support Assist on the system for the first time.
is_cloudiq_enabled bool
Indicates whether support for CloudIQ is enabled.
is_rsc_enabled bool
Indicates whether support for Remote Service Credentials is enabled.
proxy_address str
Proxy server IP address (IPv4).
proxy_port int
Proxy server port number.
proxy_username str
User name for proxy server access.
proxy_password str
Password for proxy server access.
is_icw_configured bool
Client already configured ICW.
verify_connection bool False
Indicates whether to perform the verify call or not.
send_test_alert bool False
Indicates whether to send a test alert or not.
wait_for_completion bool False
Flag to indicate if the operation should be run synchronously or asynchronously. True signifies synchronous execution. By default, modify operation will run asynchronously.
return_support_license_text bool False
Indicates whether to return support license agreement text or not.
state str True
  • present
  • absent

The state of the remote support configuration after the task is performed.
For Delete operation only, it should be set to "absent".
For get/modify operation it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Creation and deletion of remote support configuration is not supported. -* Support for check_mode is not available for this module. -* Verify and send test alert operations do not support idempotency. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of remote support configuration - dellemc.powerstore.remote_support: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - remote_support_id: 0 - state: "present" - - - name: Modify remote support configuration - SRS_Gateway_Tier2 - dellemc.powerstore.remote_support: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - remote_support_id: 0 - support_type: "SRS_Gateway_Tier2" - remote_support_servers: - - address: "10.XX.XX.XX" - port: 9443 - is_primary: True - - address: "10.XX.XX.YY" - port: 9443 - is_primary: False - server_state: "present-in-server" - is_rsc_enabled: True - is_cloudiq_enabled: False - timeout: 300 - state: "present" - - - name: Send a test alert - dellemc.powerstore.remote_support: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - remote_support_id: 0 - send_test_alert: True - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
job_details complex When asynchronous task is performed. The job details.
  id str success The ID of the job.
remote_support_details complex When remote support configuration exists. Details of the remote support configuration.
  id int success Unique identifier of remote support configuration.
  is_cloudiq_enabled bool success Indicates whether support for CloudIQ is enabled.
  is_rsc_enabled bool success Indicates whether support for Remote Service Credentials is enabled.
  is_support_assist_license_accepted bool success Indicates whether user has accepted remote support license agreement before enabling the Support Assist on the system for the first time.
  proxy_address str success Proxy server IP address (IPv4).
  proxy_password str success Password for proxy server access.
  proxy_port int success Proxy server port number.
  proxy_username str success User name for proxy server access.
  remote_support_servers complex success ['Details of two remote support servers.']
   address str success Gateway server IP address (IPv4).
   id str success Unique identifier of the remote support server.
   is_primary bool success Indicates whether the server is acting as the primary.
   port int success Gateway server port.
  support_assist_license_agreement_text str success The support assist license agreement text.
  type str success The type of remote support that is configured.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# Remote Support Contact Module - -Remote Support Contact operations on a PowerStore storage system - -### Synopsis - Performs all Remote Support Contact operations on a PowerStore Storage system. This module supports get details and you can modify a Remote Support Contact with supported parameters. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
contact_id int True
Unique identifier of the remote support contact.
first_name str
The first name of the support contact for this system.
last_name str
The last name of the support contact for this system.
phone str
The phone number of this support contact for this system.
email str
The email address of the support contact for this system.
state str True
  • present
  • absent

The state of the remote support contact after the task is performed.
For Delete operation only, it should be set to "absent".
For get/modify operation it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Creation and deletion of remote support contact is not supported. -* Parameters first_name, last_name, email and phone can be removed by passing empty string. -* The check_mode is not supported. - -### Examples -``` - - name: Get details of remote support contact - dellemc.powerstore.remote_support_contact: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - contact_id: 0 - state: "present" - - - name: Modify remote support contact - dellemc.powerstore.remote_support_contact: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - contact_id: 0 - first_name: "abc" - last_name: "xyz" - phone: "111-222-333-444" - email: "abc_xyz@dell.com" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
remote_support_contact_details complex When remote support contact exists. Details of the remote support contact.
  email str success The email address of the support contact for this system.
  first_name str success The first name of the support contact for this system.
  id int success Unique identifier of remote support contact.
  last_name str success The last name of the support contact for this system.
  phone str success The phone number of this support contact for this system.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# Remote System Module - -Remote system operations on a PowerStore storage system - -### Synopsis - Performs all remote system operations on a PowerStore Storage System. - This module supports get details of a remote systems, create/Add new remote system for all supported parameters, modify remote system with supported parameters and delete/remove a remote system. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
remote_name str
Name of the remote system.
Parameter remote_name cannot be mentioned during addition of a new remote system.
remote_id str
ID of the remote system.
ID for the remote system is autogenerated, cannot be passed during creation of a remote system.
Parameter remote_id and remote_address are mutually exclusive.
remote_user str
Username used in basic authentication to remote PowerStore cluster.
It can be mentioned only during creation of the remote system.
remote_password str
Password used in basic authentication to remote PowerStore cluster.
It can be mentioned only during creation of the remote system.
remote_address str
Management IP of the remote system.
Parameter remote_id and remote_address are mutually exclusive.
new_remote_address str
New management IP of the remote system.
remote_port int 443
Remote system's port number.
It can be mentioned only during creation of the remote system.
description str
Additional information about the remote system.
To remove the description empty string is to be passed.
network_latency str
  • Low
  • High

Replication traffic can be tuned for higher efficiency depending on the expected network latency.
Setting to low will have latency of less than five milliseconds.
Setting to high will have latency of more than five milliseconds.
wait_for_completion bool False
  • True
  • False

Flag to indicate if the operation should be run synchronously or asynchronously.
True signifies synchronous execution.
By default, modify and delete operation will run asynchronously.
state str True
  • present
  • absent

The state of the remote system after the task is performed.
For Delete operation only, it should be set to "absent".
For all Create, Modify or Get details operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The module support allows create/delete/update only for remote PowerStore arrays. -* Get details can be done for all type of remote arrays. -* Parameters remote_user, remote_port and remote_password are not required during modification, getting and deleting. If passed then these parameters will be ignored and the operation will be performed. -* If wait_for_completion is set to True then the connection will be terminated after the timeout is exceeded. User can tweak timeout and pass it in the playbook task. -* By default, the timeout is set to 120 seconds. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Add a new remote system - dellemc.powerstore.remotesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - remote_address: "xxx.xxx.xxx.xxx" - remote_user: "admin" - remote_password: "{{remote_password}}" - remote_port: 443 - network_latency: "Low" - decription: "Adding a new remote system" - state: "present" - -- name: Get details of remote system using remote_id - dellemc.powerstore.remotesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - remote_id: "D7d7e7917-735b-3eef-8cc3-1302001c08e7" - state: "present" - -- name: Delete remote system using remote_id - dellemc.powerstore.remotesystem: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - remote_id: "D7d7e7917-735b-3eef-8cc3-1302001c08e7" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
job_details complex When wait_for_completion is not set to True. Details of the job.
  id str success The id of the job.
remote_system_details complex When remote system exists Details of the remote system.
  data_connection_state str success Data connection states of a remote system.
  data_connections complex success ['List of data connections from each appliance in the local cluster to iSCSI target IP address.']
   initiator_address str success Initiating address from the local node.
   node_id str success Unique identifier of the local, initiating node.
   status str success Possible transit connection statuses.
   target_address str success Target address from the remote system.
  data_network_latency str success ['Network latency choices for a remote system. Replication traffic can be tuned for higher efficiency depending on the expected network latency.', 'This will only be used when the remote system type is PowerStore.']
  description str success User-specified description of the remote system instance.
  discovery_chap_mode str success Challenge Handshake Authentication Protocol (CHAP) statu.
  id str success The system generated ID of the remote system.
  management_address str success The management cluster IP address of the remote system.
  name str success Name of the remote system.
  serial_number str success Serial number of the remote system instance.
  session_chap_mode str success Challenge Handshake Authentication Protocol (CHAP) status.
  state str success ['Possible remote system states.', 'OK, Normal conditions.', 'Update_Needed, Verify and update needed to handle network configuration changes on the systems.', 'Management_Connection_Lost, Management connection to the remote peer is lost.']
  type str success Remote system connection type between the local system.
  user_name str success Username used to access the non-PowerStore remote systems.
  version str success ['Version of the remote system.', 'It was added in PowerStore version 2.0.0.0.']
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Replication Rule Module - -Replication rule operations on a PowerStore storage system - -### Synopsis - Performs all replication rule operations on a PowerStore Storage System. - This module supports get details of an existing replication rule, create new replication rule for supported parameters, modify replication rule and delete a specific replication rule. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
replication_rule_name str
Name of the replication rule.
Required during creation of a replication rule.
Parameter replication_rule_name and replication_rule_id are mutually exclusive.
replication_rule_id str
ID of the replication rule.
ID for the rule is autogenerated, cannot be passed during creation of a replication rule.
Parameter replication_rule_name and replication_rule_id are mutually exclusive.
new_name str
New name of the replication rule.
Used for renaming a replication rule.
rpo str
  • Five_Minutes
  • Fifteen_Minutes
  • Thirty_Minutes
  • One_Hour
  • Six_Hours
  • Twelve_Hours
  • One_Day

Recovery point objective (RPO), which is the acceptable amount of data, measured in units of time, that may be lost in case of a failure.
alert_threshold int
Acceptable delay between the expected and actual replication sync intervals. The system generates an alert if the delay between the expected and actual sync exceeds this threshold.
During creation, if not passed, then by default one RPO in minutes will be passed.
The range of integers supported are in between 0 and 1440 (inclusive of both).
remote_system str
ID or name of the remote system to which this rule will replicate the associated resources.
remote_system_address str
The management IPv4 address of the remote system.
It is required in case the remote system name passed in remote_system parameter is not unique on the PowerStore Array.
If ID of the remote system is passed then no need to pass remote_system_address.
state str True
  • present
  • absent

The state of the replication rule after the task is performed.
For Delete operation only, it should be set to "absent".
For all Create, Modify or Get details operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create new replication rule - dellemc.powerstore.replicationrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - replication_rule_name: "sample_replication_rule" - rpo: "Five_Minutes" - alert_threshold: "15" - remote_system: "WN-D8877" - state: "present" - -- name: Get details of replication rule - dellemc.powerstore.replicationrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - replication_rule_id: "{{id}}" - state: "present" - -- name: Delete an existing replication rule - dellemc.powerstore.replicationrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - replication_rule_name: "new_sample_replication_rule" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
replication_rule_details complex When replication rule exists Details of the replication rule.
  alert_threshold int success Acceptable delay in minutes between the expected and actual replication sync intervals.
  id str success The system generated ID of the replication rule.
  name str success Name of the replication rule.
  remote_system_id str success Unique identifier of the remote system to which this rule will replicate the associated resources.
  remote_system_name str success Name of the remote system to which this rule will replicate the associated resources.
  rpo str success Recovery point objective (RPO), which is the acceptable amount of data, measured in units of time, that may be lost in case of a failure.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Replication Session Module - -Replication session operations on a PowerStore storage system - -### Synopsis - Performs all replication session state change operations on a PowerStore Storage System. - This module supports get details of an existing replication session. Updating the state of the replication session. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
filesystem str
Name/ID of the filesystem for which replication session exists.
Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive.
nas_server str
Name/ID of the NAS server for which replication session exists.
Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive.
volume_group str
Name/ID of the volume group for which a replication session exists.
Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive.
volume str
Name/ID of the volume for which replication session exists.
Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive.
session_id str
ID of the replication session.
Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive.
session_state str
  • failed_over
  • paused
  • synchronizing

State in which the replication session is present after performing the task.
role str
  • Metro_Preferred
  • Metro_Non_Preferred

Role of the metro replication session.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Manual synchronization for a replication session is not supported through the Ansible module. -* When the current state of the replication session is 'OK' and in the playbook task 'synchronizing', then it will return "changed" as False. -* The changed as False in above scenario is because of there is a scheduled synchronization in place with the associated replication rule's RPO in the protection policy. -* The check_mode is not supported. -* Parameter nas_server, filesystem, and role parameters are supported only for PowerStore version 3.0.0. and above. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get details of a replication session - dellemc.powerstore.replicationsession: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - volume: "sample_volume_1" - -- name: Modify a replication session - dellemc.powerstore.replicationsession: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - volume: "sample_volume_1" - session_state: "failed_over" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
replication_session_details complex When replication session exists Details of the replication session.
  estimated_completion_timestamp str success Estimated completion time of the current replication operation.
  id str success The system generated ID of the replication session. Unique across source and destination roles.
  last_sync_timestamp str success Time of last successful synchronization.
  local_resource_id str success Unique identifier of the local storage resource for the replication session.
  name str success Name of the replication rule.
  progress_percentage int success Progress of the current replication operation.
  remote_resource_id str success Unique identifier of the remote storage resource for the replication session.
  remote_system_id str success Unique identifier of the remote system instance.
  replication_rule_id str success Associated replication rule instance if created by policy engine.
  resource_type str success Storage resource type eligible for replication protection. volume - Replication session created on a volume. volume_group - Replication session created on a volume group.
  role str success Role of the replication session. Source - The local resource is the source of the remote replication session. Destination - The local resource is the destination of the remote replication session.
  state str success State of the replication session.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Role Module - -Get details of the roles present on the PowerStore storage system - -### Synopsis - Manage role in PowerStore storage system includes getting the details of a role. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
role_name str
Name of the role.
role_id str
Id of the role.
state str True
  • absent
  • present

Define whether the role should exist or not.
Value present, indicates that the role should exist on the system.
Value absent, indicates that the role should not exist on the system.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Only getting the details of the role is supported by the ansible module. -* Creation, modification and deletion of roles is not supported by the ansible modules. -* The check_mode is not supported. - -### Examples -``` -- name: Get the details of role by name - dellemc.powerstore.role: - array_ip: "{{array_ip}}" - verifycert: "{{verify_cert}}" - user: "{{user}}" - password: "{{password}}" - role_name: "Administrator" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
role_details complex When role exists. The role details.
  description str success Description of the role.
  id str success The ID of the role.
  is_built_in bool success Indicates whether the role is built-in.
  name str success The name of the role.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# Security Config Module - -Security configuration operations for PowerStore Storage System - -### Synopsis - Managing security configuration on PowerStore storage system includes getting details and modifying security configuration parameters. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
security_config_id int True
ID of the security configuration.
Mandatory for all operations.
protocol_mode str
  • TLSv1_0
  • TLSv1_1
  • TLSv1_2

Protocol mode of the security configuration.
Mandatory only for modify operation.
state str True
  • absent
  • present

Define whether the security config should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Creation and deletion of security configs is not supported by Ansible modules. -* Modification of protocol mode is only supported for PowerStore v2.0.0.0 and above. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get security config - dellemc.powerstore.security_config: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - security_config_id: 1 - state: "present" - -- name: Modify attribute of security config - dellemc.powerstore.security_config: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - security_config_id: 1 - protocol_mode: "TLSv1_1" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
security_config_details complex When security config exists Details of the security configuration.
  id str success The system generated ID given to the security configuration.
  idle_timeout int success Idle time (in seconds) after which login sessions will expire and require re-authentication.
  protocol_mode str success The protocol mode of the security configuration.
- -### Authors -* Bhavneet Sharma (@sharmb5) - --------------------------------- -# SMB Share Module - -Manage SMB shares on a PowerStore storage system - -### Synopsis - Managing SMB Shares on PowerStore storage system includes create, get, modify, and delete the SMB shares. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
share_name str
Name of the SMB share.
Required during creation of the SMB share.
For all other operations either share_name or share_id is required.
share_id str
ID of the SMB share.
Should not be specified during creation. ID is auto generated.
For all other operations either share_name or share_id is required.
If share_id is used then no need to pass nas_server/filesystem/snapshot/ path.
path str
Local path to the file system/Snapshot or any existing sub-folder of the file system/Snapshot that is shared over the network.
Path is relative to the base of the NAS server and must start with the name of the filesystem.
Required for creation of the SMB share.
filesystem str
The ID/Name of the File System.
Either filesystem or snapshot is required for creation of the SMB share.
If filesystem name is specified, then nas_server is required to uniquely identify the filesystem.
If filesystem parameter is provided, then snapshot cannot be specified.
snapshot str
The ID/Name of the Snapshot.
Either filesystem or snapshot is required for creation of the SMB share.
If snapshot name is specified, then nas_server is required to uniquely identify the snapshot.
If snapshot parameter is provided, then filesystem cannot be specified.
SMB share can be created only if access type of snapshot is "protocol".
nas_server str
The ID/Name of the NAS Server.
It is not required if share_id is used.
description str
Description for the SMB share.
Optional parameter when creating a share.
To modify, pass the new value in description field.
is_abe_enabled bool
Indicates whether Access-based Enumeration (ABE) for SMB share is enabled.
During creation, if not mentioned, then the default is False.
is_branch_cache_enabled bool
Indicates whether Branch Cache optimization for SMB share is enabled.
During creation, if not mentioned then default is False.
is_continuous_availability_enabled bool
Indicates whether continuous availability for SMB 3.0 is enabled.
During creation, if not mentioned, then the default is False.
is_encryption_enabled bool
Indicates whether encryption for SMB 3.0 is enabled at the shared folder level.
During creation, if not mentioned then default is False.
offline_availability str
  • MANUAL
  • DOCUMENTS
  • PROGRAMS
  • NONE

Defines valid states of Offline Availability.
MANUAL- Only specified files will be available offline.
DOCUMENTS- All files that users open will be available offline.
PROGRAMS- Program will preferably run from the offline cache even when connected to the network. All files that users open will be available offline.
NONE- Prevents clients from storing documents and programs in offline cache.
umask str
The default UNIX umask for new files created on the SMB Share.
During creation, if not mentioned, then the default is "022".
For all other operations, the default is None.
state str True
  • absent
  • present

Define whether the SMB share should exist or not.
Value present indicates that the share should exist on the system.
Value absent indicates that the share should not exist on the system.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* When the ID of the filesystem/snapshot is passed then nas_server is not required. If passed, then the filesystem/snapshot should exist for the nas_server, else the task will fail. -* Multiple SMB shares can be created for the same local path. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create SMB share for a filesystem - dellemc.powerstore.smbshare: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - share_name: "sample_smb_share" - filesystem: "sample_fs" - nas_server: "{{nas_server_id}}" - path: "{{path}}" - description: "Sample SMB share created" - is_abe_enabled: True - is_branch_cache_enabled: True - offline_availability: "DOCUMENTS" - is_continuous_availability_enabled: True - is_encryption_enabled: True - state: "present" - -- name: Modify Attributes of SMB share for a snapshot - dellemc.powerstore.smbshare: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - share_name: "sample_snap_smb_share" - nas_server: "sample_nas_server" - description: "Sample SMB share attributes updated for snapshot" - is_abe_enabled: False - is_branch_cache_enabled: False - offline_availability: "MANUAL" - is_continuous_availability_enabled: False - umask: "022" - state: "present" - -- name: Delete SMB share - dellemc.powerstore.smbshare: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - share_id: "{{smb_share_id}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
smb_share_details complex When share exists. The SMB share details.
  description str success Additional information about the share.
  file_system complex success Includes ID and Name of filesystem and nas server for which smb share exists.
   filesystem_type str success Type of filesystem.
   id str success ID of filesystem.
   name str success Name of filesystem.
   nas_server dict success nas_server of filesystem.
  id str success The ID of the SMB share.
  is_ABE_enabled bool success Whether Access Based enumeration is enforced or not
  is_branch_cache_enabled bool success Whether branch cache is enabled or not.
  is_continuous_availability_enabled bool success Whether the share will be available continuously or not.
  is_encryption_enabled bool success Whether encryption is enabled or not.
  name str success Name of the SMB share.
- -### Authors -* P Srinivas Rao (@srinivas-rao5) - --------------------------------- -# SMTP Config Module - -SMTP configuration operations on a PowerStore storage system - -### Synopsis - Performs all SMTP configuration operations on a PowerStore Storage System. - This module supports get details of an existing SMTP configuration. You can modify an existing SMTP configuration with supported parameters. You can also send a test mail through configured SMTP server. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
smtp_id int True
Unique identifier of the SMTP configuration.
smtp_address str
IP address of the SMTP server.
smtp_port int
Port used for sending SMTP messages.
source_email str
Source email address used for sending SMTP messages.
destination_email str
Destination email address for the test.
state str True
  • present
  • absent

The state of the SMTP configuration after the task is performed.
For Delete operation only, it should be set to "absent".
For all operations it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Idempotency is not supported for test operation for smtp_config module. -* Creation and deletion of SMTP configuration is not supported. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Get details of SMTP configuration - dellemc.powerstore.smtp_config: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - smtp_id: "0" - state: "present" - - - name: Modify SMTP config details - dellemc.powerstore.smtp_config: - array_ip: "{{array_ip}}" - user: "{{user}}" - password: "{{password}}" - verifycert: "{{verifycert}}" - smtp_id: "0" - smtp_address: "sample.smtp.com" - source_email: "def@dell.com" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
smtp_config_details complex When SMTP configuration exists. Details of the SMTP configuration.
  address str success IP address of the SMTP server.
  id int success Unique identifier of SMTP configuration.
  port int success Port used for sending SMTP messages.
  source_email str success Source email address used for sending SMTP messages.
- -### Authors -* Trisha Datta (@Trisha_Datta) - --------------------------------- -# Snapshot Module - -Manage Snapshots for PowerStore - -### Synopsis - Managing Snapshots on PowerStore storage system, Create a new Volume Group Snapshot, Get details of Volume Group Snapshot, Modify Volume Group Snapshot, Delete an existing Volume Group Snapshot. - Module also supports Create a new Volume Snapshot, Get details of Volume Snapshot, Modify Volume Snapshot, Delete an existing Volume Snapshot. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
snapshot_name str
The name of the Snapshot. Either snapshot name or ID is required.
snapshot_id str
The ID of the Snapshot. Either snapshot ID or Snapshot name is required.
volume str
The volume. This could be the volume name or ID.
volume_group str
The volume group. This could be the volume group name or ID.
new_snapshot_name str
The new name of the Snapshot.
desired_retention str
The retention value for the Snapshot.
If the retention value is not specified, the Snapshot details would be returned.
To create a Snapshot, either a retention or expiration timestamp must be given.
If the Snapshot does not have any retention value - specify it as 'None'.
retention_unit str
  • hours
  • days

The unit for retention.
If this unit is not specified, 'hours' is taken as default retention_unit.
If desired_retention is specified, expiration_timestamp cannot be specified.
expiration_timestamp str
The expiration timestamp of the Snapshot. This should be provided in UTC format, e.g 2019-07-24T10:54:54Z.
description str
The description for the Snapshot.
state str True
  • absent
  • present

Defines whether the Snapshot should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` - - name: Create a volume snapshot on PowerStore - dellemc.powerstore.snapshot: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "{{snapshot_name}}" - volume: "{{volume}}" - description: "{{description}}" - desired_retention: "{{desired_retention}}" - retention_unit: "{{retention_unit_days}}" - state: "{{state_present}}" - - - name: Delete volume snapshot - dellemc.powerstore.snapshot: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "{{new_snapshot_name}}" - volume: "{{volume}}" - state: "{{state_absent}}" - - - name: Create a volume group snapshot on PowerStore - dellemc.powerstore.snapshot: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "{{snapshot_name}}" - volume_group: "{{volume_group}}" - description: "{{description}}" - expiration_timestamp: "{{expiration_timestamp}}" - state: "{{state_present}}" - - - name: Get details of a volume group snapshot - dellemc.powerstore.snapshot: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "{{snapshot_name}}" - volume_group: "{{volume_group}}" - state: "{{state_present}}" - - - name: Delete volume group snapshot - dellemc.powerstore.snapshot: - array_ip: "{{mgmt_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshot_name: "{{new_snapshot_name}}" - volume_group: "{{volume_group}}" - state: "{{state_absent}}" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
create_vg_snap bool When value exists A boolean flag to indicate whether volume group snapshot got created.
create_vol_snap bool When value exists A boolean flag to indicate whether volume snapshot got created.
delete_vg_snap bool When value exists A boolean flag to indicate whether volume group snapshot got deleted.
delete_vol_snap bool When value exists A boolean flag to indicate whether volume snapshot got deleted.
modify_vg_snap bool When value exists A boolean flag to indicate whether volume group snapshot got modified.
modify_vol_snap bool When value exists A boolean flag to indicate whether volume snapshot got modified.
snap_details complex When snapshot exists Details of the snapshot.
  creation_timestamp str success The creation timestamp of the snapshot.
  description str success Description about the snapshot.
  id str success The system generated ID given to the snapshot.
  name str success Name of the snapshot.
  performance_policy_id str success The performance policy for the snapshot.
  protection_data complex success The protection data of the snapshot.
   expiration_timestamp str success The expiration timestamp of the snapshot.
  protection_policy_id str success The protection policy of the snapshot.
  size int success Size of the snapshot.
  state str success The state of the snapshot.
  type str success The type of the snapshot.
  volumes complex success The volumes details of the volume group snapshot.
   id str success The system generated ID given to the volume associated with the volume group.
- -### Authors -* Rajshree Khare (@khareRajshree) -* Prashant Rakheja (@prashant-dell) - --------------------------------- -# Snapshot Rule Module - -Snapshot Rule operations on a PowerStore storage system - -### Synopsis - Performs all snapshot rule operations on PowerStore Storage System. - This modules supports get details of a snapshot rule, create new Snapshot Rule with Interval, create new Snapshot Rule with specific time and days_of_week. Modify Snapshot Rule. Delete Snapshot Rule. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
name str
String variable. Indicates the name of the Snapshot rule.
snapshotrule_id str
String variable. Indicates the ID of the Snapshot rule.
new_name str
String variable. Indicates the new name of the Snapshot rule.
Used for renaming operation.
days_of_week list
elements: str
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

List of strings to specify days of the week on which the Snapshot rule should be applied. Must be applied for Snapshot rules where the 'time_of_day' parameter is set.
Optional for the Snapshot rule created with an interval. When 'days_of_week' is not specified for a new Snapshot rule, the rule is applied on every day of the week.
interval str
  • Five_Minutes
  • Fifteen_Minutes
  • Thirty_Minutes
  • One_Hour
  • Two_Hours
  • Three_Hours
  • Four_Hours
  • Six_Hours
  • Eight_Hours
  • Twelve_Hours
  • One_Day

String variable. Indicates the interval between Snapshots.
When creating a Snapshot rule, specify either "interval" or "time_of_day", but not both.
desired_retention int
Integer variable. Indicates the desired Snapshot retention period.
It is required when creating a new Snapshot rule.
time_of_day str
String variable. Indicates the time of the day to take a daily Snapshot, with the format "hh:mm" in 24 hour time format.
When creating a Snapshot rule, specify either "interval"or "time_of_day" but not both.
delete_snaps bool False
Boolean variable to specify whether all Snapshots previously created by this rule should also be deleted when this rule is removed.
True specifies to delete all previously created Snapshots by this rule while deleting this rule.
False specifies to retain all previously created Snapshots while deleting this rule.
state str True
  • present
  • absent

String variable indicates the state of Snapshot rule.
For "Delete" operation only, it should be set to "absent".
For all Create, Modify or Get details operation it should be set to "present".
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Get details of an existing snapshot rule by id - dellemc.powerstore.snapshotrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - snapshotrule_id: "{{snapshotrule_id}}" - state: "present" - -- name: Create new snapshot rule by time_of_day and days_of_week - dellemc.powerstore.snapshotrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - desired_retention: "{{desired_retention}}" - days_of_week: - - Monday - - Wednesday - - Friday - time_of_day: "{{time_of_day}}" - state: "present" - -- name: Modify existing snapshot rule to time_of_day and days_of_week - dellemc.powerstore.snapshotrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - days_of_week: - - Monday - - Wednesday - - Friday - time_of_day: "{{time_of_day}}" - state: "present" - -- name: Delete an existing snapshot rule by name - dellemc.powerstore.snapshotrule: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{name}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
snapshotrule_details complex When snapshot rule exists Details of the snapshot rule.
  days_of_week list success List of string to specify days of the week on which the rule should be applied.
  desired_retention int success Desired snapshot retention period.
  id str success The system generated ID given to the snapshot rule.
  interval str success The interval between snapshots.
  name str success Name of the snapshot rule.
  policies complex success The protection policies details of the snapshot rule.
   id str success The protection policy ID in which the snapshot rule is selected.
   name str success Name of the protection policy in which the snapshot rule is selected.
  time_of_day str success The time of the day to take a daily snapshot.
- -### Authors -* Arindam Datta (@dattaarindam) - --------------------------------- -# Volume Module - -Manage volumes on a PowerStore storage system - -### Synopsis - Managing volume on PowerStore storage system includes create volume, get details of volume, modify volume attributes, map or unmap volume to host/host group, and delete volume. - Volume module also supports start or end of a metro configuration for a volume, clone, refresh and restore a volume. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
vol_name str
Unique name of the volume. This value must contain 128 or fewer printable unicode characters.
Required when creating a volume. All other functionalities on a volume are supported using volume name or ID.
vg_name str
The name of the volume group. A volume can optionally be assigned to a volume group at the time of creation.
Use the Volume Group Module for modification of the assignment.
vol_id str
The 36 character long ID of the volume, automatically generated when a volume is created.
Cannot be used while creating a volume. All other functionalities on a volume are supported using volume name or ID.
size float
Size of the volume. Minimum volume size is 1MB. Maximum volume size is 256TB. Size must be a multiple of 8192.
Required in case of create and expand volume.
cap_unit str
  • MB
  • GB
  • TB

Volume size unit.
Used to signify unit of the size provided for creation and expansion of volume.
It defaults to 'GB', if not specified.
new_name str
The new volume name for the volume, used in case of rename functionality.
description str
Description for the volume.
Optional parameter when creating a volume.
To modify, pass the new value in description field.
protection_policy str
The protection_policy of the volume.
To represent policy, both name or ID can be used interchangably. The module will detect both.
A volume can be assigned a protection policy at the time of creation of volume or later as well.
The policy can also be changed for a given volume by simply passing the new value.
The policy can be removed by passing an empty string.
Check examples for more clarity.
performance_policy str
  • high
  • medium
  • low

The performance_policy for the volume.
A volume can be assigned a performance policy at the time of creation of the volume, or later as well.
The policy can also be changed for a given volume, by simply passing the new value.
Check examples for more clarity.
If not given, performance policy will be 'medium'.
host str
Host to be mapped/unmapped to a volume. If not specified, an unmapped volume is created. Only one of the host or host group can be supplied in one call.
To represent host, both name or ID can be used interchangeably. The module will detect both.
hostgroup str
Hostgroup to be mapped/unmapped to a volume. If not specified, an unmapped volume is created.
Only one of the host or host group can be mapped in one call.
To represent a hostgroup, both name or ID can be used interchangeably. The module will detect both.
mapping_state str
  • mapped
  • unmapped

Define whether the volume should be mapped to a host or hostgroup.
Value mapped - indicates that the volume should be mapped to the host or host group.
Value unmapped - indicates that the volume should not be mapped to the host or host group.
Only one of a host or host group can be supplied in one call.
hlu int
Logical unit number for the host/host group volume access.
Optional parameter when mapping a volume to host/host group.
HLU modification is not supported.
clone_volume dict
Details of the volume clone.
  name str
Name of the clone set to be created.
  description str
Description of the clone.
  host str
Unique identifier or name of the host to be attached to the clone.
  host_group str
Unique identifier or name of the host group to be attached to the clone.
  logical_unit_number int
logical unit number when creating a mapped volume.
If no host_id or host_group_id is specified, logical_unit_number is ignored.
  protection_policy str
The protection policy of the clone set to be created.
  performance_policy str
  • high
  • medium
  • low

The performance policy of the clone set to be created.
source_volume str
Unique identifier or name of the volume to refresh from.
source_snap str
Unique identifier or name of the source snapshot that will be used for the restore operation.
create_backup_snap bool
Indicates whether a backup snapshot of the target volume will be created or not.
backup_snap_profile dict
Details of the backup snapshot set to be created.
  name str
Name of the backup snapshot set to be created.
The default name of the volume snapshot is the date and time when the snapshot is taken.
  description str
Description of the backup snapshot set.
  performance_policy str
  • high
  • medium
  • low

Performance policy assigned to the snapshot.
  expiration_timestamp str
Time after which the snapshot set can be auto-purged.
state str True
  • absent
  • present

Define whether the volume should exist or not.
Value present - indicates that the volume should exist on the system.
Value absent - indicates that the volume should not exist on the system.
remote_system str
The remote system to which metro relationship will be established.
The remote system must support metro volume.
This is mandatory while configuring a metro volume.
To represent remote system, both name and ID are interchangeable.
This parameter is added in PowerStore version 3.0.0.0.
remote_appliance_id str
A remote system appliance ID to which volume will be assigned.
This parameter is added in PowerStore version 3.0.0.0.
end_metro_config bool False
Whether to end the metro session from a volume.
This is mandatory for end metro configuration operation.
delete_remote_volume bool
Whether to delete the remote volume during removal of metro session.
This is parameter is added in the PowerStore version 3.0.0.0.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* To create a new volume, vol_name and size is required. cap_unit, description, vg_name, performance_policy, and protection_policy are optional. -* Parameter new_name should not be provided when creating a new volume. -* The size is a required parameter for expand volume. -* Clones or Snapshots of a deleted production volume or a clone are not deleted. -* A volume that is attached to a host/host group, or that is part of a volume group cannot be deleted. -* If volume in metro session, volume can only be modified, refreshed and restored when session is in the pause state. -* The Check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create stand-alone volume with performance and protection policy - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - size: 5 - cap_unit: "{{cap_unit}}" - state: 'present' - description: 'Description' - performance_policy: 'low' - protection_policy: 'protection_policy_name' - vg_name: "{{vg_name}}" - mapping_state: 'mapped' - host: "{{host_name}}" - -- name: Get volume details using ID - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_id: "{{result.volume_details.id}}" - state: "present" - -- name: Modify volume size, name, description, protection and performance policy - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - new_name: "{{new_name}}" - vol_name: "{{vol_name}}" - state: "present" - size: 2 - performance_policy: 'high' - description: 'new description' - protection_policy: '' - -- name: Map volume to a host with HLU - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - state: 'present' - mapping_state: 'mapped' - host: 'host1' - hlu: 12 - -- name: Clone a volume - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - clone_volume: - name: 'test_name' - description: 'test description' - host: 'test_host' - host_group: 'test_host_group' - logical_unit_number: 1 - protection_policy: 'TEST_PP' - performance_policy: 'low' - state: "present" - -- name: Restore a volume - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - source_snap: 'refresh_backup_snap' - create_backup_snap: true - backup_snap_profile: - name: 'restore_snap_2' - description: 'test backup snap' - expiration_timestamp: '2022-12-23T01:20:00Z' - performance_policy: 'low' - state: "present" - -- name: Configure a metro volume - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - remote_system: "remote-D123" - state: "present" - -- name: End a metro volume configuration - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_name: "{{vol_name}}" - end_metro_config: True - delete_remote_volume: True - state: "present" - -- name: Delete volume - dellemc.powerstore.volume: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vol_id: "{{result.volume_details.id}}" - state: "absent" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
changed bool always Whether or not the resource has changed.
is_volume_cloned bool always Whether or not the clone of volume is created.
is_volume_refreshed bool always Whether or not the volume is refreshed.
is_volume_restored bool always Whether or not the volume is restored.
volume_details complex When volume exists Details of the volume.
  description str success description about the volume.
  hlu_details complex success HLU details for mapped host/host group.
   host_group_id str success The host group ID mapped to the volume.
   host_id str success The host ID mapped to the volume.
   id str success The HLU ID.
   logical_unit_number int success Logical unit number for the host/host group volume access.
  host complex success Hosts details mapped to the volume.
   id str success The host ID mapped to the volume.
   name str success Name of the Host mapped to the volume.
  host_group complex success Host groups details mapped to the volume.
   id str success The host group ID mapped to the volume.
   name str success Name of the Host group mapped to the volume.
  id str success The system generated ID given to the volume.
  mapped_volumes complex success This is the inverse of the resource type host_volume_mapping association.
   id str success Unique identifier of a mapping between a host and a volume.
   logical_unit_number int success Logical unit number for the host volume access.
  metro_replication_session_id str success The ID of the metro replication session assigned to volume.
  name str success Name of the volume.
  nguid int success NVMe Namespace globally unique identifier. Used for volumes attached to NVMEoF hosts.
  node_affinity str success This attribute shows which node will be advertised as the optimized IO path to the volume.
  nsid int success NVMe Namespace unique identifier in the NVME subsystem. Used for volumes attached to NVMEoF hosts.
  performance_policy_id str success The performance policy for the volume.
  protection_policy_id str success The protection policy of the volume.
  size int success Size of the volume.
  snapshots complex success List of snapshot associated with the volume.
   id str success The system generated ID given to the snapshot.
   name str success Name of the snapshot.
  volume_groups complex success The volume group details of the volume.
   id str success The system generated ID given to the volume group.
   name str success Name of the volume group.
  wwn str success The world wide name of the volume.
- -### Authors -* Ambuj Dubey (@AmbujDube) -* Manisha Agrawal (@agrawm3) -* Ananthu S Kuttattu (@kuttattz) -* Bhavneet Sharma (@Bhavneet-Sharma) - --------------------------------- -# Volume Group Module - -Manage volume groups on a PowerStore Storage System - -### Synopsis - Managing volume group on PowerStore Storage System includes creating new volume group, adding volumes to volume group, removing volumes from volume group, clone of a volume group, refresh of a volume group and restore of volume group. - Module also include renaming volume group, modifying volume group, and deleting volume group. - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeRequiredDefaultChoicesDescription
vg_name str
The name of the volume group.
vg_id str
The id of the volume group.
It can be used only for Modify, Add/Remove, or Delete operation.
volumes list
elements: str

This is a list of volumes.
Either the volume ID or name must be provided for adding/removing existing volumes from a volume group.
If volumes are given, then vol_state should also be specified.
vol_state str
  • present-in-group
  • absent-in-group

String variable. Describes the state of volumes inside a volume group.
If volume is given, then vol_state should also be specified.
new_vg_name str
The new name of the volume group.
description str
Description about the volume group.
protection_policy str
String variable. Represents Protection policy id or name used for volume group.
Specifying an empty string or "" removes the existing protection policy from volume group.
is_write_order_consistent bool
A boolean flag to indicate whether Snapshot sets of the volume group will be write-order consistent.
If this parameter is not specified, the array by default sets it to true.
source_vg str
ID or name of the volume group to refresh from.
source_snap str
ID or name of the snapshot to restore from.
create_backup_snap bool
Specifies whether a backup snapshot set of the target volume group needs to be created before attempting refresh or restore.
If not specified it will be set to True.
backup_snap_profile dict
Snapshot volume group request.
  name str
Name of snapshot set to be created.
  description str
Description of the snapshot set.
  expiration_timestamp str
Time after which the snapshot set can be auto-purged.
vg_clone dict
Parameters to support clone of a volume group.
  name str True
Name for the clone volume group.
  description str
Description for the clone volume group.
  protection_policy str
ID or name of the protection policy to assign to the clone volume.
state str True
  • absent
  • present

Define whether the volume group should exist or not.
array_ip str True
IP or FQDN of the PowerStore management system.
verifycert bool True
  • True
  • False

Boolean variable to specify whether to validate SSL certificate or not.
True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
False - indicates that the SSL certificate should not be verified.
user str True
The username of the PowerStore host.
password str True
The password of the PowerStore host.
timeout int 120
Time after which the connection will get terminated.
It is to be mentioned in seconds.
port int
Port number for the PowerStore array.
If not passed, it will take 443 as default.
- -### Notes -* Parameter vol_state is mandatory if volumes are provided. -* A protection policy can be specified either for an volume group, or for the individual volumes inside the volume group. -* A volume can be a member of at most one volume group. -* Specifying "protection_policy" as empty string or "" removes the existing protection policy from a volume group. -* The check_mode is not supported. -* Refer module documentation for more sample playbooks. - -### Examples -``` -- name: Create volume group without protection policy - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vg_name: "{{vg_name}}" - description: "This volume group is for ansible" - state: "present" - -- name: Get details of volume group - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vg_name: "{{vg_name}}" - state: "present" - -- name: Add volumes to volume group - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vg_name: "{{vg_name}}" - state: "present" - volumes: - - "7f879569-676c-4749-a06f-c2c30e09b295" - - "Ansible_Testing" - vol_state: "present-in-group" - -- name: Delete volume group - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - name: "{{new_vg_name}}" - state: "absent" - -- name: Restore a volume group - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vg_name: "ansible_vg" - source_snap: "snap_source" - create_backup_snap: True - backup_snap_profile: - name: "test_snap_restore" - state: "present" - -- name: Clone a volume group - dellemc.powerstore.volumegroup: - array_ip: "{{array_ip}}" - verifycert: "{{verifycert}}" - user: "{{user}}" - password: "{{password}}" - vg_name: "ansible_vg" - vg_clone: - name: "ansible_vg_clone" - protection_policy: "policy1" - state: "present" -``` - -### Return Values - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyTypeReturnedDescription
add_vols_to_vg bool When value exists A boolean flag to indicate whether volume/s got added to volume group.
changed bool always Whether or not the resource has changed.
create_vg bool When value exists A boolean flag to indicate whether volume group got created.
delete_vg bool When value exists A boolean flag to indicate whether volume group got deleted.
modify_vg bool When value exists A boolean flag to indicate whether volume group got modified.
remove_vols_from_vg bool When value exists A boolean flag to indicate whether volume/s got removed from volume group.
volume_group_details complex When volume group exists Details of the volume group.
  description str success description about the volume group.
  id str success The system generated ID given to the volume group.
  is_write_order_consistent bool success A boolean flag to indicate whether snapshot sets of the volume group will be write-order consistent.
  name str success Name of the volume group.
  protection_policy_id str success The protection policy of the volume group.
  snapshots complex success The snapshots associated with the volume group.
   id str success ID of the snapshot.
   name str success Name of the snapshot.
  type str success The type of the volume group.
  volumes complex success The volumes details of the volume group.
   id str success The system generated ID given to the volume associated with the volume group.
   name str success The name of the volume associated with the volume group.
- -### Authors -* Akash Shendge (@shenda1) -* Arindam Datta (@dattaarindam) - --------------------------------- diff --git a/docs/Release Notes.md b/docs/Release Notes.md index 65ad06f..4602e78 100644 --- a/docs/Release Notes.md +++ b/docs/Release Notes.md @@ -1,6 +1,6 @@ **Ansible Modules for Dell Technologies PowerStore** ========================================= -### Release Notes 1.8.0 +### Release Notes 1.9.0 > © 2022 Dell Inc. or its subsidiaries. All rights reserved. Dell, > and other trademarks are trademarks of Dell Inc. or its @@ -26,9 +26,9 @@ The table in this section lists the revision history of this document. Table 1. Revision history -| Revision | Date | Description | -|----------|-----------|-----------------------------------------------------------| -| 01 | December 2022 | Current release of Ansible Modules for Dell PowerStore 1.8.0 | +| Revision | Date | Description | +|----------|------------|-----------------------------------------------------------| +| 01 | March 2023 | Current release of Ansible Modules for Dell PowerStore 1.9.0 | Product Description ------------------- @@ -38,15 +38,14 @@ New features & enhancements --------------------------- Along with the previous release deliverables, this release supports these features: -- Cluster module is enhanced to create a cluster and validate the cluster create attributes. -- NAS server module is enhanced to support the following functionalities: - - Associate a protection policy to a NAS server - - Disassociate a protection policy from a NAS server. -- Replication session module is enhanced to support filesystem and NAS server replication sessions. -- Volume group is enhanced to support the following functionalities: - - Clone a volume group. - - Refresh a volume group. - - Restore a volume group. +- Volume module is enhanced to support app_type, and app_type_other. +- Info module is enhanced to list vCenters and virtual volumes. +- Filesystem module is enhanced to support config_type, flr_attributes, is_async_mtime_enabled, file_events_publishing_mode and host_io_size. +- vCenter module supports the following functionalities: + - Get details of vCenter. + - Add vCenter. + - Modify attributes of vCenter. + - Remove vCenter. Known issues ------------ @@ -63,11 +62,11 @@ Limitations Distribution ---------------- The software package is available for download from the [Ansible Modules -for PowerStore GitHub](https://github.com/dell/ansible-powerstore/tree/1.8.0) page. +for PowerStore GitHub](https://github.com/dell/ansible-powerstore/tree/1.9.0) page. Documentation ------------- -The documentation is available on [Ansible Modules for PowerStore GitHub](https://github.com/dell/ansible-powerstore/tree/1.8.0/docs) +The documentation is available on [Ansible Modules for PowerStore GitHub](https://github.com/dell/ansible-powerstore/tree/1.9.0/docs) page. It includes these: - README - Release Notes (this document) diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 0c38c52..885fd60 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -12,7 +12,7 @@ You may obtain a copy of the License at The Ansible modules for Dell PowerStore repository are inspected for security vulnerabilities via blackduck scans and static code analysis. -In addition to this, there are various security checks that get executed against a branch when a pull request is created/updated. Please refer to [pull request](https://github.com/dell/ansible-powerstore/blob/1.8.0/docs/CONTRIBUTING.md#Pull-requests) for more information. +In addition to this, there are various security checks that get executed against a branch when a pull request is created/updated. Please refer to [pull request](https://github.com/dell/ansible-powerstore/blob/1.9.0/docs/CONTRIBUTING.md#Pull-requests) for more information. ## Reporting a vulnerability diff --git a/docs/modules/certificate.rst b/docs/modules/certificate.rst new file mode 100644 index 0000000..86f4267 --- /dev/null +++ b/docs/modules/certificate.rst @@ -0,0 +1,303 @@ +.. _certificate_module: + + +certificate -- Certificate operations for PowerStore Storage System +=================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Supports the provisioning operations on a Certificate such as add/import, modify, reset, exchange and get the details of a certificate. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + certificate_id (optional, str, None) + Unique identifier of the certificate. + + Mandatory only for modify operation. + + + certificate_type (optional, str, None) + Type of the certificate. + + + service (optional, str, None) + Type of the service for which the certificate is used. + + Mandatory for reset and exchange operation. + + + scope (optional, str, None) + Defines a subset of certificates belonging to one Service. + + + certificate (optional, str, None) + Concatenated PEM encoded x509_certificate string from end-entity certificate to root certificate. + + + remote_address (optional, str, None) + IPv4 or DNS name of the remote cluster. + + + remote_user (optional, str, None) + The username of the remote cluster. + + + remote_password (optional, str, None) + The password of the remote cluster. + + + remote_port (optional, int, None) + The port address of the remote cluster. + + + is_current (optional, bool, None) + Indicates whether this is the current X509 certificate to be used by the service or this X509 Certificate will be used in the future. + + + state (True, str, None) + Define whether the certificate should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Idempotency is not supported for adding/importing certificates, exchange of certificates and the reset of certificates. + - Only is_current parameter is supported for modification of certificate. + - Reset operation can reset more than one certificate at a time. + - Add/import, modify and reset are supported for PowerStore versions 2.0 and above only. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get details of certificate with certificate_id + dellemc.powerstore.certificate: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + certificate_id: "e940144f-393f-4e9c-8f54-9a4d57b38c48" + state: "present" + + - name: Reset certificates + dellemc.powerstore.certificate: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + service: "VASA_HTTP" + state: "present" + + - name: Exchange certificates + dellemc.powerstore.certificate: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + service: "Replication_HTTP" + remote_address: "{{remote_array_ip}}" + remote_port: 443 + remote_user: "{{remote_user}}" + remote_password: "{{remote_password}}" + state: "present" + + - name: Add/import a certificate + dellemc.powerstore.certificate: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + certificate_type: "CA_Client_Validation" + service: "VASA_HTTP" + certificate: "{{certificate_string}}" + is_current: True + state: "present" + + - name: Modify certificate + dellemc.powerstore.certificate: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + certificate_id: "37b76535-612b-456a-a694-1389f17632c7" + is_current: True + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +certificate_details (When certificate exists, complex, {'id': '1f0fd938-f122-482a-97b3-72ab1500d007', 'is_current': True, 'is_valid': True, 'members': [{'certificate': 'MIIFejCCA2KgAwIBAgIJAPru9o7dBIwFMA0GCSqGSIb3D QEBCwUAMFcxCzAJBgNVBAYTAlVTMQswCQ', 'depth': 1, 'issuer': 'CN=Dell Technologies PowerStore CA LBSD548W,O=Dell Technologies,ST=MA,C=US', 'key_length': 4096, 'public_key_algorithm': 'SHA256withRSA', 'subject': 'CN=Dell Technologies PowerStore CA LBSD548W,O=Dell Technologies,ST=MA,C=US', 'subject_alternative_names': [], 'thumbprint': '5ff9bc0108dffb0374189d08bc11a6a97eaedac5add511e8a30e7ce283a0ced6', 'thumbprint_algorithm': 'SHA-256', 'thumbprint_algorithm_l10n': 'SHA-256', 'valid_from': '2021-02-02T17:35:29.0Z', 'valid_to': '2026-01-16T17:35:29.0Z'}], 'scope': '1.2.3.4', 'service': 'Management_HTTP', 'service_l10n': 'Management_HTTP', 'type': 'Server', 'type_l10n': 'Server'}) + Details of the certificate. + + + id (, str, ) + The system generated ID given to the certificate. + + + type (, str, ) + Type of the certificate. + + + service (, str, ) + Type of the service for which the certificate is used. + + + is_valid (, bool, ) + Indicates whether this is a valid X509 certificate. + + + is_current (, bool, ) + Whether the certificate can be used now or not. + + + type_l10n (, str, ) + Localized message string corresponding to type. + + + service_l10n (, str, ) + Localized message string corresponding to service. + + + members (, complex, ) + Member certificates included in this x509_certificate. + + + subject (, str, ) + Certificate subject or so called distinguished name. + + + serial_number (, str, ) + Certificate serial number. + + + signature_algorithm (, str, ) + Certificate signature algorithm. + + + issuer (, str, ) + Distinguished name of the certificate issuer. + + + valid_from (, str, ) + Date and time when the certificate becomes valid. + + + valid_to (, str, ) + Date and time when the certificate will expire. + + + subject_alternative_names (, list, ) + Additional DNS names or IP addresses in the x509_certificate. + + + public_key_algorithm (, str, ) + Public key algorithm used to generate the key pair. + + + key_length (, int, ) + Private key length. + + + thumbprint_algorithm (, str, ) + The thumbprint algorithm. + + + thumbprint (, str, ) + CeHash value of the certificate. + + + certificate (, str, ) + Base64 encoded certificate without any line breaks. + + + depth (, str, ) + Depth indicates the position of this member certificate in the X509 Certificate chain. + + + thumbprint_algorithm_l10n (, str, ) + Localized message string corresponding to thumbprint_algorithm. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/cluster.rst b/docs/modules/cluster.rst new file mode 100644 index 0000000..8fbcfe4 --- /dev/null +++ b/docs/modules/cluster.rst @@ -0,0 +1,605 @@ +.. _cluster_module: + + +cluster -- Manage cluster related operations on PowerStore +========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing cluster on PowerStore storage system includes creating cluster, validating create cluster attributes, getting details and modifying cluster configuration parameters. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + cluster_name (optional, str, None) + The Name of cluster. + + + chap_mode (optional, str, None) + The mode that describes or sets the iSCSI CHAP mode for the cluster. + + + cluster_id (optional, str, None) + Id of the cluster. + + + new_name (optional, str, None) + The new name for the cluster. + + + service_password (optional, str, None) + The password for the service user. + + + appliance_id (optional, str, None) + ID of the appliance. + + Parameters appliance_id and appliance_name are mutually exclusive. + + Parameter is_ssh_enabled has to be passed along with appliance_id. + + + appliance_name (optional, str, None) + Name of the appliance. + + Parameters appliance_id and appliance_name are mutually exclusive. + + Parameter is_ssh_enabled has to be passed along with appliance_name. + + + is_ssh_enabled (optional, bool, None) + Whether SSH access is enabled for the cluster. + + Either appliance_id or appliance_name is to be passed along with is_ssh_enabled. + + + physical_mtu (optional, int, None) + MTU for ethernet ports in the cluster. + + The MTU can be set between 1500 to 9000. + + + ignore_network_warnings (False, bool, None) + Whether to ignore the network warning about unreachable external network. + + + appliances (optional, list, None) + Appliance configuration setting during cluster creation. + + This is mandatory for create cluster operation. + + + link_local_address (True, str, None) + The unique IPv4 address of the appliance and is set by zeroconf. + + + name (optional, str, None) + Name of new appliance. + + + drive_failure_tolerance_level (optional, str, None) + Specifies the possible drive failure tolerance levels. + + + + dns_servers (optional, list, None) + DNS server addresses in IPv4 format. At least one DNS server should be provided. + + This is mandatory for create cluster operation. + + + ntp_servers (optional, list, None) + NTP server addresses in IPv4 or hostname format. At least one NTP server should be provided. + + This is mandatory for create cluster operation. + + + physical_switches (optional, list, None) + Physical switch setting for a new cluster. + + + name (True, str, None) + Name of the physical switch. + + + purpose (True, str, None) + Specifies the purpose of the physical switch. + + + connections (True, list, None) + specifies the supported connection for the physical switch. + + + address (True, str, None) + Specifies the physical switch address in IPv4 or DNS hostname format. + + + port (optional, int, None) + Specifies the port used for connection to switch. + + + connect_method (True, str, None) + Specifies the connection method type for the physical Switch. + + + username (optional, str, None) + Specifies username to connect a physical switch for SSH connection method. + + + ssh_password (optional, str, None) + Specifies SSH password to connect a physical switch. + + + snmp_community_string (optional, str, None) + Specifies SNMPv2 community string, if SNMPv2 connect method is selected. + + + + + networks (optional, list, None) + Configuration of one or more network(s) based on network type. + + This is mandatory for create cluster operation. + + + type (True, str, None) + Specifies the type of the network. + + + vlan_id (optional, int, None) + The ID of the VLAN. + + + prefix_length (True, int, None) + Network prefix length. + + + gateway (optional, str, None) + Network gateway in IPv4 format. + + + cluster_mgmt_address (optional, str, None) + New cluster management IP address in IPv4 format. + + + storage_discovery_address (optional, str, None) + New storage discovery IP address in IPv4 format. + + This can be specified only when configure the storage network type. + + + addresses (True, list, None) + IP addresses in IPv4 format. + + + purposes (optional, list, None) + Purpose of the network. + + Only applicable for storage network. + + + + vcenters (optional, list, None) + Configure vCenter settings when creating cluster. + + Currently, for vcenters parameter API supports only single element. + + This is required when creating PowerStore X cluster and optional for PowerStore T. + + + address (True, str, None) + IP address of vCenter in IPv4 or hostname format. + + + username (True, str, None) + User name to login to vCenter. + + + password (True, str, None) + Password to login to vCenter. + + + is_verify_server_cert (True, bool, None) + Whether or not the connection will be secured with the vcenter SSL certificate. + + + data_center_name (optional, str, None) + Name of the data center. + + This is used to join an existing datacenter in vcenter. + + This should be specified when creating PowerStore X cluster. + + Mutually exclusive with data_center_id. + + + data_center_id (optional, str, None) + The VMWare ID of datacenter. + + This is used to join an existing datacenter in vcenter. + + This should be specified when creating PowerStore X cluster. + + Mutually exclusive with data_center_name. + + + esx_cluster_name (optional, str, None) + Name of the ESXi cluster. + + This should be specified when creating PowerStore X cluster. + + + vasa_provider_credentials (True, dict, None) + Storage system credentials for vCenter to use for communicating with the storage system using VASA. + + + username (True, str, None) + Username of the local user account which will be used by vSphere to register VASA provider. + + + password (True, str, None) + Password of the local user account which will be used by vSphere to register VASA provider. + + + + + is_http_redirect_enabled (optional, bool, None) + Whether to redirect the HTTP requests to HTTPS. + + + validate_create (optional, bool, True) + Whether to perform create cluster validate call. + + + wait_for_completion (optional, bool, False) + Flag to indicate if the operation should be run synchronously or asynchronously. + + True signifies synchronous execution. By default, create cluster operation will run asynchronously. + + + state (True, str, None) + Define whether the cluster should exist or not. + + Value present indicates that the cluster should exist on the system. + + Value absent indicates that the cluster should not exist on the system. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Deletion of a cluster is not supported by ansible module. + - The check_mode is not supported. + - Before performing create operation, the default password for admin user and service user should be changed. + - For management type network during cluster creation, storage_discovery_address and purposes should not be passed. + - The vcenters parameter is mandatory for PowerStore X cluster creation. + - Minimum 3 and 5 addresses are required for management network for PowerStore T and X model respectively. + - The File_Mobility purpose is supported only in FootHills Prime and above. + - Parameter is_http_redirect_enabled is supported only in PowerStore FootHills Prime and above. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get the details of cluster using id + dellemc.powerstore.cluster: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + cluster_id: "0" + state: "present" + + - name: Modify details of cluster using the name + dellemc.powerstore.cluster: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + cluster_name: "RT-D1320" + appliance_id: "A1" + is_ssh_enabled: True + service_password: "S@mple_password" + chap_mode: "Disabled" + new_name: "new_RT-D1320" + state: "present" + + - name: Validate create cluster + dellemc.powerstore.cluster: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + cluster_name: "RT-D1320" + ignore_network_warnings: True + appliances: + - link_local_address: "1.2.x.x" + name: "Ansible_cluster" + derive_failure_tolerance_level: "Double" + dns_servers: + - "1.1.x.x" + ntp_servers: + - "1.3.x.x" + networks: + - type: "Management" + vlan_id: 0 + prefix_length: 24 + gateway: "1.x.x.x" + cluster_mgmt_address: "1.x.x.x" + addresses: + - "2.x.x.x" + - "3.x.x.x" + - type: "Storage" + vlan_id: 0 + prefix_length: 42 + gateway: "1.x.x.x" + storage_discovery_address: "1.x.x.x" + addresses: + - "2.x.x.x" + - "3.x.x.x" + purpose: + - "ISCSI" + is_http_redirect_enabled: True + validate_create: True + state: "present" + + - name: Create cluster + dellemc.powerstore.cluster: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + cluster_name: "RT-D1320" + ignore_network_warnings: True + appliances: + - link_local_address: "1.2.x.x" + name: "Ansible_cluster" + derive_failure_tolerance_level: "Double" + dns_servers: + - "1.1.x.x" + ntp_servers: + - "1.3.x.x" + physical_switch: + - name: "Ansible_switch" + purpose: "Management_Only" + connections: + - address: "1.x.x.x" + port: 20 + connect_method: "SSH" + username: "user" + ssh_password: "password" + networks: + - type: "Management" + vlan_id: 0 + prefix_length: 24 + gateway: "1.x.x.x" + cluster_mgmt_address: "1.x.x.x" + addresses: + - "2.x.x.x" + - "3.x.x.x" + - type: "Storage" + vlan_id: 0 + prefix_length: 42 + gateway: "1.x.x.x" + storage_discovery_address: "1.x.x.x" + addresses: + - "2.x.x.x" + - "3.x.x.x" + purpose: + - "ISCSI" + vcenters: + - address: "1.x.x.x" + username: "user" + password: "password" + is_verify_server_cert: True + vasa_provider_credentials: + username: "user" + password: "password" + is_http_redirect_enabled: True + wait_for_completion: False + state: "present" + + + +Return Values +------------- + +changed (always, bool, true) + Whether or not the resource has changed. + + +job_details (When asynchronous task is performed., complex, {'description_l10n': 'Create Cluster.', 'end_time': '2022-01-06T07:39:05.846+00:00', 'estimated_completion_time': None, 'id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'parent_id': None, 'phase': 'Completed', 'phase_l10n': 'Completed', 'progress_percentage': 100, 'resource_action': 'create', 'resource_action_l10n': 'create', 'resource_id': '0', 'resource_name': None, 'resource_type': 'cluster', 'resource_type_l10n': 'cluster', 'response_body': {'id': 0, 'response_type': 'job_create_response'}, 'response_status': None, 'response_status_l10n': None, 'root_id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'start_time': '2022-01-06T07:39:05.47+00:00', 'state': 'COMPLETED', 'state_l10n': 'Completed', 'step_order': 23792565, 'user': 'admin'}) + The job details. + + + id (, str, ) + The ID of the job. + + + +cluster_details (When Cluster exists., complex, {'appliance_count': 1, 'chap_mode': 'Disabled', 'compatibility_level': 10, 'global_id': 'PS00d01e1bb312', 'id': 0, 'is_encryption_enabled': True, 'management_address': '1.2.3.4', 'master_appliance_id': 'A1', 'name': 'WN-D8977', 'physical_mtu': 1500, 'service_config_details': None, 'state': 'Configured', 'state_l10n': 'Configured', 'storage_discovery_address': '10.230.42.228', 'system_time': '2022-02-04T11:18:37.441Z'}) + The cluster details. + + + id (, str, ) + The ID of the cluster. + + + name (, str, ) + Name of the cluster. + + + is_ssh_enabled (, bool, ) + Whether or not the ssh is enabled. + + + physical_mtu (, int, ) + MTU for the cluster. + + + global_id (, str, ) + The global unique identifier of the cluster. + + + management_address (, str, ) + The floating management IP address for the cluster in IPv4 or IPv6 format. + + + storage_discovery_address (, str, ) + The floating storage discovery IP address for the cluster in IPv4 or IPv6 format. + + + master_appliance_id (, str, ) + The unique identifier of the appliance acting as primary. This parameter is deprecated in version 2.0.0.0. + + + primary_appliance_id (, str, ) + The unique identifier of the appliance acting as primary. This parameter was added in version 2.0.0.0. + + + appliance_count (, int, ) + Number of appliances configured in this cluster. + + + is_encryption_enabled (, bool, ) + Whether or not Data at Rest Encryption is enabled on the cluster. + + + compatibility_level (, int, ) + The behavioral version of the software version API, It is used to ensure the compatibility across potentially different software versions. + + + state (, str, ) + Possible cluster states. + + + system_time (, str, ) + Current clock time for the system. System time and all the system reported times are in UTC (GMT+0:00) format. + + + service_config_details (When is_ssh_enabled is passed in the playbook task, complex, ) + Details of the service config for the entered appliance. + + + id (, str, ) + Id of the service configuration. + + + appliance_id (, str, ) + Id of the appliance for which the service configuration exists. + + + is_ssh_enabled (, bool, ) + Whether the ssh is enabled for the appliance or not. + + + + service_user_details (when the cluster exists., complex, ) + Details of the service user for which the password can be updated. + + + id (, str, ) + Id of the service user. + + + name (, str, ) + Name of the service user. + + + is_default_password (, bool, ) + Whether the service user has default password or not. + + + is_built_in (, bool, ) + Whether the service user is built in or not. + + + + appliance_details (When appliance name or id is passed in the playbook task., complex, ) + Name and Id of the appliance for which is_ssh_enabled parameter is used. + + + id (, str, ) + Id of the appliance. + + + name (, str, ) + Name of the appliance. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) +- Bhavneet Sharma (@sharmb5) + diff --git a/docs/modules/dns.rst b/docs/modules/dns.rst new file mode 100644 index 0000000..6207063 --- /dev/null +++ b/docs/modules/dns.rst @@ -0,0 +1,172 @@ +.. _dns_module: + + +dns -- DNS operations on a PowerStore storage system +==================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all DNS operations on a PowerStore Storage System. This module supports get details of an existing DNS instance. You can modify existing DNS instance with supported parameters. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + dns_id (True, str, None) + Unique identifier of the DNS instance. + + + dns_addresses (False, list, None) + DNS server addresses in IPv4 format. + + + dns_address_state (False, str, None) + State of the addresses mentioned in dns_addresses. + + + state (True, str, None) + The state of the DNS instance after the task is performed. + + For get and modify operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Minimum 1 and maximum 3 addresses can be associated to a DNS instance. + - Parameters dns_addresses and dns_address_state are required together. + - Creation and deletion of DNS is not supported. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get details of DNS instance + dellemc.powerstore.dns: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + dns_id: "DNS1" + state: "present" + + - name: Add addresses to DNS instance + dellemc.powerstore.dns: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + dns_id: "DNS1" + dns_addresses: + - "XX.XX.XX.XX" + - "YY.YY.YY.YY" + dns_address_state: "present-in-dns" + state: "present" + + - name: Remove addresses from DNS instance + dellemc.powerstore.dns: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + dns_id: "DNS1" + dns_addresses: + - "YY.YY.YY.YY" + dns_address_state: "absent-in-dns" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +dns_details (When DNS exists., complex, {'addresses': ['1.2.3.4', '5.6.7.8'], 'id': 'DNS1'}) + Details of the DNS instance. + + + id (, str, ) + Unique identifier of DNS instance. + + + addresses (, str, ) + DNS server addresses in IPv4 format. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/email.rst b/docs/modules/email.rst new file mode 100644 index 0000000..670772b --- /dev/null +++ b/docs/modules/email.rst @@ -0,0 +1,257 @@ +.. _email_module: + + +email -- Destination Email operations on a PowerStore storage system +==================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all destination email operations on a PowerStore Storage System. + +This module supports get details of an existing destination email address. Create/Add new destination email address for all supported parameters. + +This Module supports modify destination email address with supported parameters. + +This Module supports delete/remove a specific destination email address. Send a test mail to a specific destination email address. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + email_id (False, str, None) + Unique identifier of the destination email address. + + Mutually exclusive with email_address. + + + email_address (False, str, None) + Email address to receive notifications. + + Mutually exclusive with email_id. + + + new_address (False, str, None) + New email address to receive notifications. + + + send_test_email (False, bool, False) + Whether to send the test email to the destination email address. + + + notify (optional, dict, None) + Whether to send different types of notifications. It contains below optional candidate variables. + + + critical (False, bool, None) + Whether to send notifications for critical alerts. + + + major (False, bool, None) + Whether to send notifications for major alerts. + + + minor (False, bool, None) + Whether to send notifications for minor alerts. + + + info (False, bool, None) + Whether to send notifications for informational alerts. + + + + state (True, str, None) + The state of the destination email address after the task is performed. + + For Delete operation only, it should be set to "absent". + + For all Create, Modify, Test or Get details operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Idempotency is not supported for Test operation of Email module. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get details of destination email with email_id + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_id: "780b6220-2d0b-4b9f-a485-4ae7f673bd98" + state: "present" + + - name: Get details of destination email with email_address + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_address: "abc@dell.com" + state: "present" + + - name: Create destination email + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_address: "abc_xyz@dell.com" + notify: + info: True + critical: True + major: False + state: "present" + + - name: Modify destination email + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_address: "abc_xyz@dell.com" + new_address: "def_pqr@dell.com" + notify: + info: False + major: False + state: "present" + + - name: Send a test mail to the destination email with email_id + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_id: "780b6220-2d0b-4b9f-a485-4ae7f673bd98" + send_test_email: True + state: "present" + + - name: Delete destination email + dellemc.powerstore.email: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + email_address: "def_pqr@dell.com" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +email_details (When destination email address exists, complex, {'email_address': 'abc@dell.com', 'id': 'e49c9469-a055-4207-898e-0c4150737722', 'notify': {'critical': True, 'info': True, 'major': True, 'minor': True}}) + Details of the destination email address. + + + id (, str, ) + The system generated ID of the destination email instance. + + + email_address (, str, ) + Email address to receive notifications. + + + notify (, complex, ) + Whether to send different types of notifications. + + + critical (, bool, ) + Whether to send notifications for critical alerts. + + + info (, bool, ) + Whether to send notifications for informational alerts. + + + major (, bool, ) + Whether to send notifications for major alerts. + + + minor (, bool, ) + Whether to send notifications for minor alerts. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/filesystem.rst b/docs/modules/filesystem.rst new file mode 100644 index 0000000..6b1771e --- /dev/null +++ b/docs/modules/filesystem.rst @@ -0,0 +1,553 @@ +.. _filesystem_module: + + +filesystem -- Filesystem operations for PowerStore Storage system +================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Supports the provisioning operations on a filesystem such as create, modify, delete and get the details of a filesystem. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + filesystem_name (optional, str, None) + Name of the file system. Mutually exclusive with *filesystem_id*. Mandatory only for create operation. + + + filesystem_id (optional, str, None) + Unique id of the file system. Mutually exclusive with *filesystem_name*. + + + description (optional, str, None) + Description of the file system. + + + nas_server (optional, str, None) + Name or ID of the NAS Server on which the file system is created. Mandatory parameter whenever *filesystem_name* is provided, since filesystem names are unique only within a NAS server. + + + size (optional, int, None) + Size that the file system presents to the host or end user. + + Mandatory only for create operation. + + + cap_unit (optional, str, None) + Capacity unit for the size. + + It defaults to ``GB``, if not specified. + + + access_policy (optional, str, None) + File system security access policies. + + + locking_policy (optional, str, None) + File system locking policies. + + ``ADVISORY``- No lock checking for NFS and honor SMB lock range only for SMB. + + ``MANDATORY``- Honor SMB and NFS lock range. + + + folder_rename_policy (optional, str, None) + File system folder rename policies for the file system with multi-protocol access enabled. + + ``ALL_ALLOWED`` - All protocols are allowed to rename directories without any restrictions. + + ``SMB_FORBIDDEN`` - A directory rename from the SMB protocol will be denied if at least one file is opened in the directory or in one of its child directories. + + ``All_FORBIDDEN`` - Any directory rename request will be denied regardless of the protocol used, if at least one file is opened in the directory or in one of its child directories. + + + smb_properties (optional, dict, None) + Advance settings for SMB. It contains optional candidate variables listed below. + + + is_smb_sync_writes_enabled (optional, bool, None) + Indicates whether the synchronous writes option is enabled on the file system. + + + is_smb_no_notify_enabled (optional, bool, None) + Indicates whether notifications of changes to directory file structure are enabled. + + + is_smb_op_locks_enabled (optional, bool, None) + Indicates whether opportunistic file locking is enabled on the file system. + + + is_smb_notify_on_access_enabled (optional, bool, None) + Indicates whether file access notifications are enabled on the file system. + + + is_smb_notify_on_write_enabled (optional, bool, None) + Indicates whether file write notifications are enabled on the file system. + + + smb_notify_on_change_dir_depth (optional, int, None) + Determines the lowest directory level to which the enabled notifications apply. minimum value is ``1``. + + + + protection_policy (optional, str, None) + Name or ID of the protection policy applied to the file system. + + Specifying "" (empty string) removes the existing protection policy from file system. + + + quota_defaults (optional, dict, None) + Contains the default attributes for a filesystem quota.It contains below optional candidate variables. + + + grace_period (optional, int, None) + Grace period of soft limit. + + + grace_period_unit (optional, str, None) + Unit of the grace period of soft limit. + + + default_hard_limit (optional, int, None) + Default hard limit of user quotas and tree quotas. + + + default_soft_limit (optional, int, None) + Default soft limit of user quotas and tree quotas. + + + cap_unit (optional, str, None) + Capacity unit for default hard & soft limit. + + + + flr_attributes (optional, dict, None) + The attributes for file retention. + + Can only be provided when the *config_type* is ``GENERAL``. + + + mode (optional, str, None) + The FLR type of the file system. + + It can only be provided during creation of a filesystem. + + + minimum_retention (optional, str, None) + The shortest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. + + + default_retention (optional, str, None) + The default retention period that is used in an FLR-enabled file system when a file is locked and a retention period is not specified. + + + maximum_retention (optional, str, None) + The longest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. + + + auto_lock (optional, bool, None) + Indicates whether to automatically lock files in an FLR-enabled file system. + + + auto_delete (optional, bool, None) + Indicates whether locked files will be automatically deleted from an FLR-enabled file system once their retention periods have expired. + + This setting can only be applied to a mounted FLR enabled file systems. + + + policy_interval (optional, int, None) + Indicates how long to wait (in seconds) after files are modified before the files are automatically locked. + + This setting can only be applied to mounted FLR enabled file systems. + + + + config_type (optional, str, None) + Indicates the file system type. + + Cannot be modified. + + + is_async_mtime_enabled (optional, bool, None) + Indicates whether asynchronous MTIME is enabled on the file system or protocol snaps that are mounted writeable. + + + file_events_publishing_mode (optional, str, None) + State of the event notification services for all file systems of the NAS server. + + It can only be set to ``NFS_ONLY`` when *config_typ* is set to ``VMWARE``. + + + host_io_size (optional, str, None) + Typical size of writes from the server or other computer using the VMware file system to the storage system. + + Can only be set when the *config_type* is ``VMWARE``. + + Cannot be modified. + + + state (True, str, None) + Define whether the filesystem should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - It is recommended to remove the protection policy before deleting the filesystem. + - The *check_mode* is not supported. + - The pattern for *minimum_retention*, *default_retention* and *maximum_retention* is (^\d+[DMY])|(^infinite$). + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create FileSystem by Name + register: result_fs + dellemc.powerstore.filesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + filesystem_name: "{{filesystem_name}}" + description: "{{description}}" + nas_server: "{{nas_server_id}}" + size: "5" + cap_unit: "GB" + access_policy: "UNIX" + locking_policy: "MANDATORY" + smb_properties: + is_smb_no_notify_enabled: True + is_smb_notify_on_access_enabled: True + quota_defaults: + grace_period: 1 + grace_period_unit: 'days' + default_hard_limit: 3 + default_soft_limit: 2 + protection_policy: "{{protection_policy_id}}" + config_type: "VMWARE" + is_async_mtime_enabled: True + file_events_publishing_mode: "NFS_ONLY" + host_io_size: "VMWARE_16K" + state: "present" + + - name: Modify File System by id + dellemc.powerstore.filesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + filesystem_id: "{{fs_id}}" + folder_rename_policy: "ALL_ALLOWED" + smb_properties: + is_smb_op_locks_enabled: True + smb_notify_on_change_dir_depth: 3 + quota_defaults: + grace_period: 2 + grace_period_unit: 'weeks' + default_hard_limit: 2 + default_soft_limit: 1 + is_async_mtime_enabled: True + file_events_publishing_mode: "ALL" + flr_attributes: + mode: "Enterprise" + minimum_retention: "5D" + default_retention: "1M" + maximum_retention: "1Y" + state: "present" + + - name: Get File System details by id + dellemc.powerstore.filesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + filesystem_id: "{{result_fs.filesystem_details.id}}" + state: "present" + + - name: Delete File System by id + dellemc.powerstore.filesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + filesystem_id: "{{result_fs.filesystem_details.id}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +filesystem_details (When filesystem exists, complex, {'access_policy': 'Native', 'access_policy_l10n': 'Native', 'access_type': None, 'access_type_l10n': None, 'creation_timestamp': None, 'creator_type': None, 'creator_type_l10n': None, 'default_hard_limit': 0, 'default_soft_limit': 0, 'description': None, 'expiration_timestamp': None, 'filesystem_type': 'Primary', 'filesystem_type_l10n': 'Primary', 'folder_rename_policy': 'All_Forbidden', 'folder_rename_policy_l10n': 'All Renames Forbidden', 'grace_period': 604800, 'id': '61e49f3f-9b57-e69b-1038-aa02b52a030f', 'is_async_MTime_enabled': False, 'is_modified': False, 'is_quota_enabled': False, 'is_smb_no_notify_enabled': False, 'is_smb_notify_on_access_enabled': False, 'is_smb_notify_on_write_enabled': False, 'is_smb_op_locks_enabled': True, 'is_smb_sync_writes_enabled': True, 'last_refresh_timestamp': None, 'last_writable_timestamp': None, 'locking_policy': 'Advisory', 'locking_policy_l10n': 'Advisory', 'name': 'sample-filesystem', 'nas_server': {'id': '6026056b-5405-0e36-7697-c285b9fa42b7', 'name': 'ansible_nas_server_2'}, 'parent_id': None, 'protection_policy': None, 'size_total': '214748364800', 'size_used': '1621098496', 'smb_notify_on_change_dir_depth': 512, 'snapshots': {}, 'total_size_with_unit': '200.0 GB', 'used_size_with_unit': '1.51 GB'}) + Details of the filesystem. + + + id (, str, ) + The system generated ID given to the filesystem. + + + name (, str, ) + Name of the filesystem. + + + description (, str, ) + The description about the filesystem. + + + protection_policy (, dict, ) + Id and name of the protection policy associated with the filesystem. + + + nas_server (, dict, ) + Id and name of the nas server to which the filesystem belongs. + + + size_total (, int, ) + Total size of the filesystem in bytes. + + + total_size_with_unit (, str, ) + Total size of the filesystem with appropriate unit. + + + size_used (, int, ) + Used size of the filesystem in bytes. + + + used_size_with_unit (, str, ) + Used size of the filesystem with appropriate unit. + + + access_policy (, str, ) + Access policy about the filesystem. + + + locking_policy (, str, ) + Locking policy about the filesystem. + + + is_smb_no_notify_enabled (, bool, ) + Whether smb notify policy is enabled for a filesystem. + + + is_smb_notify_on_access_enabled (, bool, ) + Whether smb on access notify policy is enabled. + + + is_smb_op_locks_enabled (, bool, ) + Whether smb op lock is enabled. + + + grace_period (, int, ) + Default grace period for a filesystem quota in second. + + + default_hard_limit (, int, ) + Default hard limit period for a filesystem quota in byte. + + + default_soft_limit (, int, ) + Default soft limit period for a filesystem quota in byte. + + + snapshots (, list, ) + Id and name of the snapshots of a filesystem. + + + is_async_MTime_enabled (, bool, ) + Indicates whether asynchronous MTIME is enabled on the file system. + + + file_events_publishing_mode (, str, ) + State of the event notification services for all file systems of the NAS server. + + + config_type (, str, ) + Indicates the file system type. + + + host_io_size (, str, ) + Typical size of writes from the server or other computer using the VMware file system to the storage system. + + + flr_attributes (, complex, ) + The file retention attributes. + + + mode (, str, ) + The FLR type of the file system. + + + minimum_retention (, str, ) + The shortest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. + + + default_retention (, str, ) + The default retention period that is used in an FLR-enabled file system when a file is locked and a retention period is not specified. + + + maximum_retention (, str, ) + The longest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. + + + auto_lock (, bool, ) + Indicates whether to automatically lock files in an FLR-enabled file system. + + + auto_delete (, bool, ) + Indicates whether locked files will be automatically deleted from an FLR-enabled file system once their retention periods have expired. + + + policy_interval (, int, ) + Indicates how long to wait (in seconds) after files are modified before the files are automatically locked. + + + has_protected_files (, bool, ) + Indicates whether FLR file system has protected files. + + + clock_time (, str, ) + Per file system clock used to track the retention date. + + + maximum_retention_date (, str, ) + Maximum date and time that has been set on any locked file in an FLR-enabled file system, which means that the file system itself will be protected until this date and time. + + + + access_type (, str, ) + Indicates whether the snapshot directory or protocol access is granted to the file system snapshot. + + + creation_timestamp (, str, ) + Time, in seconds, when the snapshot was created. + + + creator_type (, str, ) + Snapshot creator type. + + + expiration_timestamp (, str, ) + Time, in seconds, when the snapshot will expire. + + + filesystem_type (, str, ) + Indicates the type of a file system. + + + folder_rename_policy (, str, ) + File system folder rename policies for the file system with multiprotocol access enabled. + + + is_modified (, bool, ) + Indicates whether the snapshot may have changed since it was created. + + + is_quota_enabled (, bool, ) + Indicates whether quota is enabled. + + + is_smb_notify_on_write_enabled (, bool, ) + Indicates whether file writes notifications are enabled on the file system. + + + is_smb_sync_writes_enabled (, bool, ) + Indicates whether the synchronous writes option is enabled on the file system. + + + last_refresh_timestamp (, str, ) + Time, in seconds, when the snapshot was last refreshed. + + + last_writable_timestamp (, str, ) + If not mounted, and was previously mounted, the time (in seconds) of last mount. + + + parent_id (, str, ) + Unique identifier of the object of the parent of this file system. + + + smb_notify_on_change_dir_depth (, int, ) + Lowest directory level to which the enabled notifications apply, if any. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) +- Trisha Datta (@trisha-dell) + diff --git a/docs/modules/filesystem_snapshot.rst b/docs/modules/filesystem_snapshot.rst new file mode 100644 index 0000000..b20f7eb --- /dev/null +++ b/docs/modules/filesystem_snapshot.rst @@ -0,0 +1,265 @@ +.. _filesystem_snapshot_module: + + +filesystem_snapshot -- Manage Filesystem Snapshots for PowerStore +================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Supports the provisioning operations on a filesystem snapshot such as create, modify, delete and get the details of a filesystem snapshot. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + snapshot_name (optional, str, None) + The name of the filesystem snapshot. + + Mandatory for create operation. + + Specify either snapshot name or ID (but not both) for any operation. + + + snapshot_id (optional, str, None) + The ID of the Snapshot. + + + filesystem (optional, str, None) + The ID/Name of the filesystem for which snapshot will be taken. + + If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. + + Mandatory for create operation. + + + nas_server (optional, str, None) + The NAS server, this could be the name or ID of the NAS server. + + + description (optional, str, None) + The description for the filesystem snapshot. + + + desired_retention (optional, int, None) + The retention value for the Snapshot. + + If the desired_retention/expiration_timestamp is not mentioned during creation, snapshot will be created with unlimited retention. + + Maximum supported desired retention is 31 days. + + + retention_unit (optional, str, hours) + The unit for retention. + + + expiration_timestamp (optional, str, None) + The expiration timestamp of the snapshot. This should be provided in UTC format, e.g 2020-07-24T10:54:54Z. + + To remove the expiration timestamp, specify it as an empty string. + + + access_type (optional, str, None) + Specifies whether the snapshot directory or protocol access is granted to the filesystem snapshot. + + For create operation, if access_type is not specified, snapshot will be created with 'SNAPSHOT' access type. + + + state (True, str, None) + Define whether the filesystem snapshot should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create filesystem snapshot + dellemc.powerstore.filesystem_snapshot: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "sample_filesystem_snapshot" + nas_server: "ansible_nas_server" + filesystem: "sample_filesystem" + desired_retention: 20 + retention_unit: "days" + state: "present" + + - name: Get the details of filesystem snapshot + dellemc.powerstore.filesystem_snapshot: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_id: "{{fs_snapshot_id}}" + state: "present" + + - name: Modify the filesystem snapshot + dellemc.powerstore.filesystem_snapshot: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "sample_filesystem_snapshot" + nas_server: "ansible_nas_server" + description: "modify description" + expiration_timestamp: "" + state: "present" + + - name: Delete filesystem snapshot + dellemc.powerstore.filesystem_snapshot: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_id: "{{fs_snapshot_id}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +create_fs_snap (always, bool, false) + Whether or not the resource has created. + + +delete_fs_snap (always, bool, false) + Whether or not the resource has deleted. + + +modify_fs_snap (always, bool, false) + Whether or not the resource has modified. + + +filesystem_snap_details (When snapshot exists., dict, {'access_policy': None, 'access_policy_l10n': None, 'access_type': 'Snapshot', 'access_type_l10n': 'Snapshot', 'creation_timestamp': '2022-01-16T21:58:02+00:00', 'creator_type': 'User', 'creator_type_l10n': 'User', 'default_hard_limit': None, 'default_soft_limit': None, 'description': None, 'expiration_timestamp': '2022-01-17T00:58:00+00:00', 'filesystem_type': 'Snapshot', 'filesystem_type_l10n': 'Snapshot', 'folder_rename_policy': None, 'folder_rename_policy_l10n': None, 'grace_period': None, 'id': '61e49f3f-9b57-e69b-1038-aa02b52a030f', 'is_async_MTime_enabled': False, 'is_modified': False, 'is_quota_enabled': None, 'is_smb_no_notify_enabled': None, 'is_smb_notify_on_access_enabled': None, 'is_smb_notify_on_write_enabled': None, 'is_smb_op_locks_enabled': None, 'is_smb_sync_writes_enabled': None, 'last_refresh_timestamp': None, 'last_writable_timestamp': None, 'locking_policy': None, 'locking_policy_l10n': None, 'name': 'sample-filesystem-snapshot', 'nas_server': {'id': '6026056b-5405-0e36-7697-c285b9fa42b7', 'name': 'ansible_nas_server_2'}, 'parent_id': '61e4947b-8992-3db7-2859-aa02b52a0308', 'parent_name': 'sample-filesystem', 'protection_policy': None, 'size_total': '214748364800', 'size_used': '1621098496', 'smb_notify_on_change_dir_depth': 0}) + Details of the snapshot. + + + access_type (, str, ) + Displays the type of access allowed to the snapshot. + + + creation_timestamp (, str, ) + The date and time the snapshot was created. + + + description (, str, ) + Description of the filesystem snapshot. + + + expiration_timestamp (, str, ) + The date and time the snapshot is due to be automatically deleted by the system. + + + id (, str, ) + Unique identifier of the filesystem snapshot instance. + + + name (, str, ) + The name of the snapshot. + + + nas_server (, dict, ) + Details of NAS server on which snapshot is present. + + + id (, str, ) + ID of the NAS server. + + + name (, str, ) + Name of the NAS server + + + + parent_id (, str, ) + ID of the filesystem on which snapshot is taken. + + + parent_name (, str, ) + Name of the filesystem on which snapshot is taken. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) + diff --git a/docs/modules/host.rst b/docs/modules/host.rst new file mode 100644 index 0000000..8c64817 --- /dev/null +++ b/docs/modules/host.rst @@ -0,0 +1,423 @@ +.. _host_module: + + +host -- Manage host on PowerStore storage system +================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing host on PowerStore storage system includes create host with a set of initiators, add/remove initiators from host, rename host and delete host. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + host_name (optional, str, None) + The host name. This value must contain 128 or fewer printable Unicode characters. + + Creation of an empty host is not allowed. + + Required when creating a host. + + Use either host_id or host_name for modify and delete tasks. + + + host_id (False, str, None) + The 36 character long host id automatically generated when a host is created. + + Use either host_id or host_name for modify and delete tasks. + + The host_id cannot be used while creating host, as it is generated by the array after creation of host. + + + os_type (optional, str, None) + Operating system of the host. + + Required when creating a host. + + OS type cannot be modified for a given host. + + + initiators (optional, list, None) + List of Initiator WWN or IQN or NQN to be added or removed from the host. + + Subordinate initiators in a host can only be of one type, either FC or iSCSI. + + Required when creating a host. + + It is mutually exclusive with detailed_initiators. + + + detailed_initiators (optional, list, None) + Initiator properties. + + It is mutually exclusive with initiators. + + + port_name (True, str, None) + Name of port type. + + The port_name is mandatory key. + + + port_type (optional, str, None) + Protocol type of the host initiator. + + + chap_single_username (optional, str, None) + Username for single CHAP authentication. + + CHAP username is required when the cluster CHAP mode is mutual authentication. + + Minimum length is 1 and maximum length is 64 characters. + + + chap_single_password (optional, str, None) + Password for single CHAP authentication. + + CHAP password is required when the cluster CHAP mode is mutual authentication. + + Minimum length is 12 and maximum length is 64 characters. + + + chap_mutual_username (optional, str, None) + Username for mutual CHAP authentication. + + CHAP username is required when the cluster CHAP mode is mutual authentication. + + Minimum length is 1 and maximum length is 64 characters. + + + chap_mutual_password (optional, str, None) + Password for mutual CHAP authentication. + + CHAP password is required when the cluster CHAP mode is mutual authentication. + + Minimum length is 12 and maximum length is 64 characters. + + + + state (True, str, None) + Define whether the host should exist or not. + + Value present - indicates that the host should exist in system. + + Value absent - indicates that the host should not exist in system. + + + initiator_state (optional, str, None) + Define whether the initiators should be present or absent in host. + + Value present-in-host - indicates that the initiators should exist on host. + + Value absent-in-host - indicates that the initiators should not exist on host. + + Required when creating a host with initiators or adding/removing initiators to/from existing host. + + + new_name (optional, str, None) + The new name of host for renaming function. This value must contain 128 or fewer printable Unicode characters. + + Cannot be specified when creating a host. + + + host_connectivity (False, str, None) + Connectivity type for host. + + If any of metro connectivity options specified, a metro host must exists in both cluster provide connectivity to a metro volume from both cluster. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Only completely and correctly configured iSCSI initiators can be associated with a host. + - The parameters initiators and detailed_initiators are mutually exclusive. + - For mutual CHAP authentication, single CHAP credentials are mandatory. + - Support of NVMe type of initiators is for PowerStore 2.0 and beyond. + - The host_connectivity is supported only in PowerStore 3.0.0.0 and above. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create host with FC initiator + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_name: "ansible-test-host-1" + os_type: 'Windows' + host_connectivity: "Metro_Optimize_Local" + initiators: + - 21:00:00:24:ff:31:e9:fc + state: 'present' + initiator_state: 'present-in-host' + + - name: Create host with iSCSI initiator and its details + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_name: "ansible-test-host-2" + os_type: 'Windows' + detailed_initiators: + - port_name: 'iqn.1998-01.com.vmware:lgc198248-5b06fb37' + port_type: 'iSCSI' + chap_single_username: 'chapuserSingle' + chap_single_password: 'chappasswd12345' + - port_name: 'iqn.1998-01.com.vmware:imn198248-5b06fb37' + port_type: 'iSCSI' + chap_mutual_username: 'chapuserMutual' + chap_mutual_password: 'chappasswd12345' + state: 'present' + initiator_state: 'present-in-host' + + - name: Get host details by id + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_id: "5c1e869b-ed8a-4845-abae-b102bc249d41" + state: 'present' + + - name: Add initiators to host by name + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_name: "ansible-test-host-1" + initiators: + - 21:00:00:24:ff:31:e9:ee + initiator_state: 'present-in-host' + state: 'present' + + - name: Add initiators to host by id + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_id: "5c1e869b-ed8a-4845-abae-b102bc249d41" + detailed_initiators: + - port_name: 'iqn.1998-01.com.vmware:imn198248-5b06fb37' + port_type: 'iSCSI' + chap_mutual_username: 'chapuserMutual' + chap_mutual_password: 'chappasswd12345' + initiator_state: 'present-in-host' + state: 'present' + + - name: Remove initiators from by id + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_id: "8c1e869b-fe8a-4845-hiae-h802bc249d41" + initiators: + - 21:00:00:24:ff:31:e9:ee + initiator_state: 'absent-in-host' + state: 'present' + + - name: Modify host by name + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_name: "ansible-test-host-1" + new_name: "ansible-test-host-1-new" + host_connectivity: "Metro_Optimize_Remote" + state: 'present' + + - name: Delete host + dellemc.powerstore.host: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + host_name: "ansible-test-host-1-new" + state: 'absent' + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +host_details (When host exists, complex, {'description': None, 'host_group_id': None, 'host_initiators': [{'active_sessions': [], 'chap_mutual_username': '', 'chap_single_username': '', 'port_name': 'iqn.1998-01.com.vmware:losat106-0eab2afe', 'port_type': 'iSCSI'}], 'id': '4d56e60-fc10-4f51-a698-84a664562f0d', 'mapped_hosts': [], 'name': 'sample_host', 'os_type': 'ESXi', 'host_connectivity': 'Local_Only', 'os_type_l10n': 'ESXi'}) + Details of the host. + + + id (, str, ) + The system generated ID given to the host. + + + name (, str, ) + Name of the host. + + + description (, str, ) + Description about the host. + + + host_group_id (, str, ) + The host group ID of host. + + + os_type (, str, ) + The os type of the host. + + + host_initiators (, complex, ) + The initiator details of this host. + + + port_name (, str, ) + Name of the port. + + + port_type (, str, ) + The type of the port. + + + chap_single_username (, str, ) + Username for single CHAP authentication. + + + chap_mutual_username (, str, ) + Username for mutual CHAP authentication. + + + active_sessions (, list, ) + List of active login sessions between an initiator and a target port. + + + + type (, str, ) + Type of the host. + + + mapped_hosts (, complex, ) + This is the inverse of the resource type host_volume_mapping association. + + + id (, str, ) + Unique identifier of a mapping between a host and a volume. + + + logical_unit_number (, int, ) + Logical unit number for the host volume access. + + + host_group (, dict, ) + Details about a host group to which host is mapped. + + + id (, str, ) + ID of the host group. + + + name (, str, ) + Name of the host group. + + + + volume (, dict, ) + Details about a volume which has mapping with the host. + + + id (, str, ) + ID of the volume. + + + name (, str, ) + Name of the volume. + + + + + host_connectivity (, str, ) + Connectivity type for host. It was added in 3.0.0.0. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Manisha Agrawal (@agrawm3) + diff --git a/docs/modules/hostgroup.rst b/docs/modules/hostgroup.rst new file mode 100644 index 0000000..4b6b903 --- /dev/null +++ b/docs/modules/hostgroup.rst @@ -0,0 +1,265 @@ +.. _hostgroup_module: + + +hostgroup -- Manage host group on PowerStore Storage System +=========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing host group on PowerStore storage system includes create host group with a set of hosts, add/remove hosts from host group, rename host group, and delete host group. + +Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + hostgroup_name (optional, str, None) + The host group name. This value must contain 128 or fewer printable Unicode characters. + + Creation of an empty host group is not allowed. + + Required when creating a host group. + + Use either hostgroup_id or hostgroup_name for modify and delete tasks. + + + hostgroup_id (optional, str, None) + The 36-character long host group id, automatically generated when a host group is created. + + Use either hostgroup_id or hostgroup_name for modify and delete tasks. + + The hostgroup_id cannot be used while creating host group, as it is generated by the array after creation of host group. + + + hosts (optional, list, None) + List of hosts to be added or removed from the host group. + + Subordinate hosts in a host group can only be of one type, either FC or iSCSI. + + Required when creating a host group. + + To represent host, both name or ID can be used interchangeably. The module will detect both. + + + state (True, str, None) + Define whether the host group should exist or not. + + Value present - indicates that the host group should exist on the system. + + Value absent - indicates that the host group should not exist on the system. + + Deletion of a host group results in deletion of the containing hosts as well. Remove hosts from the host group first to retain them. + + + host_state (optional, str, None) + Define whether the hosts should be present or absent in host group. + + Value present-in-group - indicates that the hosts should exist on the host group. + + Value absent-in-group - indicates that the hosts should not exist on the host group. + + Required when creating a host group with hosts or adding/removing hosts from existing host group. + + + new_name (optional, str, None) + The new name for host group renaming function. This value must contain 128 or fewer printable Unicode characters. + + + host_connectivity (False, str, None) + Connectivity type for host group. + + If any of metro connectivity options specified, a metro host group must exists in both cluster provide connectivity to a metro volume from both cluster. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The host_connectivity is supported only PowerStore 3.0.0.0 and above. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create host group with hosts + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_name: "{{hostgroup_name}}" + hosts: + - host1 + - c17fc987-bf82-480c-af31-9307b89923c3 + state: 'present' + host_state: 'present-in-group' + + - name: Get host group details using ID + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_id: "{{host group_id}}" + state: 'present' + + - name: Add hosts to host group + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_name: "{{hostgroup_name}}" + hosts: + - host3 + host_state: 'present-in-group' + state: 'present' + + - name: Remove hosts from host group + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_name: "{{hostgroup_name}}" + hosts: + - host3 + host_state: 'absent-in-group' + state: 'present' + + - name: Modify host group + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_name: "{{hostgroup_name}}" + host_connectivity: "Metro_Optimize_Both" + new_name: "{{new_hostgroup_name}}" + state: 'present' + + - name: Delete host group + dellemc.powerstore.hostgroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + hostgroup_name: "{{hostgroup_name}}" + state: 'absent' + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +hostgroup_details (When host group exists, complex, {'description': None, 'hosts': [{'id': '1ff90201-a576-482c-b7fe-0d4dc901da67', 'name': 'sample_host'}], 'id': '80fc96fa-227e-4796-84b8-c6452c5b8f64', 'host_connectivity': 'Local_Only', 'name': 'sample_host_group'}) + Details of the host group. + + + id (, str, ) + The system generated ID given to the host group. + + + name (, str, ) + Name of the host group. + + + description (, str, ) + Description about the host group. + + + hosts (, complex, ) + The hosts details which are part of this host group. + + + id (, str, ) + The ID of the host. + + + name (, str, ) + The name of the host. + + + + host_connectivity (, str, ) + Connectivity type for host group. It was added in 3.0.0.0. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Manisha Agrawal (@agrawm3) + diff --git a/docs/modules/info.rst b/docs/modules/info.rst new file mode 100644 index 0000000..e1fcb40 --- /dev/null +++ b/docs/modules/info.rst @@ -0,0 +1,1156 @@ +.. _info_module: + + +info -- Gathers information about PowerStore Storage entities +============================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Gathers the list of specified PowerStore Storage System entities, includes block/file provisioning modules, replication modules, configuration modules, and virtualization modules. + +Block provisioning module includes volumes, volume groups, hosts, host groups, snapshot rules, and protection policies. + +File provisioning module includes NAS servers, NFS exports, SMB shares, tree quotas, user quotas, and file systems. + +Replication module includes replication rules, replication sessions, and remote system. + +Virtualization module includes vCenters and virtual volumes. + +Configuration module includes cluster nodes, networks, roles, local users, appliances, security configs, certificates, AD/LDAP servers, LDAP accounts, and LDAP domain. + +It also includes DNS/NTP servers, smtp configs, email destinations, remote support, and remote support contacts. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + gather_subset (True, list, None) + A list of string variables which specify the PowerStore system entities requiring information. + + Volumes - vol. + + All the nodes - node. + + Volume groups - vg. + + Protection policies - protection_policy. + + Hosts - host. + + Host groups - hg. + + Snapshot rules - snapshot_rule. + + NAS servers - nas_server. + + NFS exports - nfs_export. + + SMB shares - smb_share. + + Tree quotas - tree_quota. + + User quotas - user_quota. + + File systems - file_system. + + Replication rules - replication_rule. + + Replication sessions - replication_session. + + Remote systems - remote_system. + + Various networks - network. + + Roles - role. + + Local users - user. + + Appliances - appliance. + + Security configurations - security_config. + + Certificates - certificate. + + Active directories - ad. + + LDAPs - ldap. + + DNS servers - dns. + + NTP servers - ntp. + + Email notification destinations - email_notification. + + SMTP configurations - smtp_config. + + Remote Support - remote_support. + + Remote support contacts - remote_support_contact. + + LDAP accounts - ldap_account. + + LDAP domain - ldap_domain. + + All vCenters - vcenter. + + Virtual volumes - virtual_volume. + + + filters (False, list, None) + A list of filters to support filtered output for storage entities. + + Each filter is a list of filter_key, filter_operator, filter_value. + + Supports passing of multiple filters. + + + filter_key (True, str, None) + Name identifier of the filter. + + + filter_operator (True, str, None) + Operation to be performed on the filter key. + + + filter_value (True, str, None) + Value of the filter key. + + + + all_pages (optional, bool, False) + Indicates whether to return all available entities on the storage system. + + If set to True, the Info module will implement pagination and return all entities. Otherwise, a maximum of the first 100 entities of any type will be returned. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Pagination is not supported for role, local user, security configs, LDAP accounts and LDAP domain. If all_pages is passed, it will be ignored. + - The check_mode is supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get list of volumes, volume groups, hosts, host groups and node + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - vol + - vg + - host + - hg + - node + + - name: Get list of replication related entities + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - replication_rule + - replication_session + - remote_system + + - name: Get list of volumes whose state notequal to ready + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - vol + filters: + - filter_key: "state" + filter_operator: "notequal" + filter_value: "ready" + + - name: Get list of protection policies and snapshot rules + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - protection_policy + - snapshot_rule + + - name: Get list of snapshot rules whose desired_retention between 101-499 + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - snapshot_rule + filters: + - filter_key: "desired_retention" + filter_operator: "greater" + filter_value: "100" + - filter_key: "desired_retention" + filter_operator: "lesser" + filter_value: "500" + + - name: Get list of nas server, nfs_export and smb share + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - nas_server + - nfs_export + - smb_share + + - name: Get list of tree quota, user quota and file system + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - tree_quota + - user_quota + - file_system + + - name: Get list of nas server whose name equal to 'nas_server' + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - nas_server + filters: + - filter_key: "name" + filter_operator: "equal" + filter_value: "nas_server" + + - name: Get list of smb share whose name contains 'share' + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - nas_server + filters: + - filter_key: "name" + filter_operator: "like" + filter_value: "*share*" + + - name: Get list of user, role, network and appliances + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - user + - role + - network + - appliance + + - name: Get list of ad, certificate, security config and ldaps + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - ad + - ldap + - certificate + - security_config + + - name: Get list of networks whose name contains 'Management' + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - network + filters: + - filter_key: "name" + filter_operator: "like" + filter_value: "*Management*" + + - name: Get list of dns, email notification, ntp, remote support, remote support contact and smtp config + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - dns + - email_notification + - ntp + - remote_support + - remote_support_contact + - smtp_config + + - name: Get list of emails which receives minor notifications + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - email_notification + filters: + - filter_key: 'notify_minor' + filter_operator: 'equal' + filter_value: 'False' + + - name: Get list of LDAP accounts + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - ldap_account + + - name: Get list of LDAP accounts with type as "User" + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - ldap_account + filters: + - filter_key: 'type' + filter_operator: 'equal' + filter_value: 'User' + + - name: Get list of LDAP domain + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - ldap_domain + + - name: Get list of LDAP domain with protocol as "LDAPS" + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - ldap_domain + filters: + - filter_key: 'protocol' + filter_operator: 'equal' + filter_value: 'LDAPS' + + - name: Get list of vCenters + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - vcenter + + - name: Get list of virtual volumes + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - virtual_volume + + + + +Return Values +------------- + +changed (always, bool, false) + Shows whether or not the resource has changed. + + +Array_Software_Version (always, str, 2.1.0.0) + API version of PowerStore array. + + +ActiveDirectory (When ad is in a given gather_subset, list, [{'id': '60866158-5d00-3d7a-971b-5adabf42d82c'}]) + Provides details of all active directories. + + + id (, str, ) + ID of the active directory. + + + +Appliance (When appliance is in a given gather_subset, list, [{'id': 'A1', 'model': 'PowerStore 1000T', 'name': 'Appliance-WND8977'}]) + Provides details of all appliances. + + + id (, str, ) + ID of the appliance. + + + name (, str, ) + Name of the appliance. + + + model (, str, ) + Model type of the PowerStore. + + + +Certificate (When certificates is in a given gather_subset, list, [{'id': 'e940144f-393f-4e9c-8f54-9a4d57b38c48'}]) + Provides details of all certificates. + + + id (, str, ) + ID of the certificate. + + + +Cluster (always, list, [{'id': '0', 'name': 'RT-D1006'}]) + Provides details of all clusters. + + + id (always, str, ) + ID of the cluster. + + + name (always, str, ) + Name of the cluster. + + + +DNS (When dns is in a given gather_subset, list, [{'id': 'DNS1'}]) + Provides details of all DNS servers. + + + id (always, str, ) + ID of the DNS server. + + + +EmailNotification (When email_notification is in a given gather_subset, list, [{'email_address': 'abc', 'id': '9c3e5cba-17d5-4d64-b97c-350f91e2b714'}]) + Provides details of all emails to which notifications will be sent. + + + id (always, str, ) + ID of the email. + + + email_address (always, str, ) + Email address. + + + +FileSystems (When file_system is in a given gather_subset, list, [{'id': '61ef399b-f4c4-ccb6-1761-16c6ac7490fc', 'name': 'test_fs'}]) + Provides details of all filesystems. + + + id (, str, ) + ID of the filesystem. + + + name (, str, ) + Name of the filesystem. + + + +HostGroups (When hg is in a given gather_subset, list, [{'id': 'f62b97b4-f262-417c-8dc9-39bec9024665', 'name': 'test_hg'}]) + Provides details of all host groups. + + + id (, str, ) + ID of the host group. + + + name (, str, ) + Name of the host group. + + + +Hosts (When host is in a given gather_subset, list, [{'id': '42a0d739-20e6-49ec-afa6-65d2b3c006c8', 'name': 'test_host'}]) + Provides details of all hosts. + + + id (, str, ) + ID of the host. + + + name (, str, ) + Name of the host. + + + +LDAP (When ldap is in a given gather_subset, list, [{'id': '60ba0edd-551a-64f1-ce49-8a83a5bce479'}]) + Provides details of all LDAPs. + + + id (, str, ) + ID of the LDAP. + + + +LDAPAccounts (When LDAP account is in a given gather_subset, list, [{'id': '5', 'role_id': '1', 'domain_id': '2', 'name': 'sample_ldap_user', 'type': 'User', 'type_l10n': 'User', 'dn': 'cn=sample_ldap_user,dc=ldap,dc=com'}]) + Provides details of all LDAP accounts. + + + id (, str, ) + ID of the LDAP account. + + + role_id (, int, ) + Unique identifier of the role to which the LDAP account is mapped. + + + domain_id (, int, ) + Unique identifier of the LDAP domain to which LDAP user or group belongs. + + + name (, str, ) + Name of the LDAP account. + + + type (, str, ) + Type of LDAP account. + + + dn (, str, ) + Types of directory service protocol. + + + +LDAPDomain (When LDAP domain configuration is in a given gather_subset, list, [{'id': '9', 'domain_name': 'domain.com', 'port': 636, 'protocol': 'LDAPS', 'protocol_l10n': 'LDAPS', 'bind_user': 'cn=ldapadmin,dc=domain,dc=com', 'ldap_timeout': 300000, 'ldap_server_type': 'OpenLDAP', 'ldap_server_type_l10n': 'OpenLDAP', 'is_global_catalog': False, 'user_id_attribute': 'uid', 'user_object_class': 'inetOrgPerson', 'user_search_path': 'dc=domain,dc=com', 'group_name_attribute': 'cn', 'group_member_attribute': 'member', 'group_object_class': 'groupOfNames', 'group_search_path': 'dc=domain,dc=com', 'group_search_level': 0, 'ldap_servers': ['10.xxx.xx.xxx']}]) + Provides details of the LDAP domain configurations. + + + id (, str, ) + Unique identifier of the new LDAP server configuration. + + + domain_name (, str, ) + Name of the LDAP authority to construct the LDAP server configuration. + + + ldap_servers (, list, ) + List of IP addresses of the LDAP servers for the domain. IP addresses are in IPv4 format. + + + port (, int, ) + Port number used to connect to the LDAP server(s). + + + ldap_server_type (, str, ) + Types of LDAP server. + + + protocol (, str, ) + Types of directory service protocol. + + + bind_user (, str, ) + Distinguished Name (DN) of the user to be used when binding. + + + ldap_timeout (, int, ) + Timeout for establishing a connection to an LDAP server. Default value is 30000 (30 seconds). + + + is_global_catalog (, bool, ) + Whether or not the catalog is global. Default value is false. + + + user_id_attribute (, str, ) + Name of the LDAP attribute whose value indicates the unique identifier of the user. + + + user_object_class (, str, ) + LDAP object class for users. + + + user_search_path (, str, ) + Path used to search for users on the directory server. + + + group_name_attribute (, str, ) + Name of the LDAP attribute whose value indicates the group name. + + + group_member_attribute (, str, ) + Name of the LDAP attribute whose value contains the names of group members within a group. + + + group_object_class (, str, ) + LDAP object class for groups. + + + group_search_path (, str, ) + Path used to search for groups on the directory server. + + + group_search_level (, int, ) + Nested search level for performing group search. + + + ldap_server_type_l10n (, str, ) + Localized message string corresponding to ldap_server_type. + + + protocol_l10n (, str, ) + Localized message string corresponding to protocol. + + + +LocalUsers (When user is in a given gather_subset, list, [{'id': '1', 'name': 'admin'}]) + Provides details of all local users. + + + id (, str, ) + ID of the user. + + + name (, str, ) + Name of the user. + + + +NASServers (When nas_server is in a given gather_subset, list, [{'id': '61e1c9bb-b791-550e-a785-16c6ac7490fc', 'name': 'test_nas'}]) + Provides details of all nas servers. + + + id (, str, ) + ID of the nas server. + + + name (, str, ) + Name of the nas server. + + + +Networks (When network is in a given gather_subset, list, [{'id': 'NW1', 'name': 'Default Management Network'}]) + Provides details of all networks. + + + id (, str, ) + ID of the network. + + + name (, str, ) + Name of the network. + + + +NFSExports (When nfs_export is in a given gather_subset, list, [{'id': '61ef39a0-09b3-5339-c8bb-16c6ac7490fc', 'name': 'test_nfs'}]) + Provides details of all nfs exports. + + + id (, str, ) + ID of the nfs export. + + + name (, str, ) + Name of the nfs export. + + + +Nodes (When a node is in a given gather_subset, list, [{'id': 'N1', 'name': 'Appliance-RT-D1006-node-A'}]) + Provides details of all nodes. + + + id (, str, ) + ID of the node. + + + name (, str, ) + Name of the node. + + + +NTP (When ntp is in a given gather_subset, list, [{'id': 'NTP1'}]) + Provides details of all NTP servers. + + + id (always, str, ) + ID of the NTP server. + + + +ProtectionPolicies (When protection_policy is in a given gather_subset, list, [{'id': '4eff379c-090c-48e0-9949-b2cd0ce2cf88', 'name': 'test_protection_policy'}]) + Provides details of all protection policies. + + + id (, str, ) + ID of the protection policy. + + + name (, str, ) + Name of the protection policy. + + + +RemoteSupport (When remote_support is in a given gather_subset, list, [{'id': '0'}]) + Provides details of all remote support config. + + + id (, str, ) + ID of the remote support. + + + +RemoteSupportContact (When remote_support_contact is in a given gather_subset, list, [{'id': '0'}, {'id': '1'}]) + Provides details of all remote support contacts. + + + id (, str, ) + ID of the remote support contact. + + + +ReplicationRules (When replication_rule is in a given gather_subset, list, [{'id': '55d14477-de22-4d39-b24d-07cf08ba329f', 'name': 'ansible_rep_rule'}]) + Provides details of all replication rules. + + + id (, str, ) + ID of the replication rule. + + + name (, str, ) + Name of the replication rule. + + + +ReplicationSession (when replication_session given in gather_subset, list, [{'id': '0b0a7ae9-c0c4-4dce-8c49-570f4ea80bb0'}]) + Details of all replication sessions. + + + id (, str, ) + ID of the replication session. + + + +RemoteSystems (When remote_system is in a given gather_subset, list, [{'id': 'f07be373-dafd-4a46-8b21-f7cf790c287f', 'name': 'WN-D8978'}]) + Provides details of all remote systems. + + + id (, str, ) + ID of the remote system. + + + name (, str, ) + Name of the remote system. + + + +Roles (When role is in a given gather_subset, list, [{'id': '1', 'name': 'Administrator'}, {'id': '2', 'name': 'Storage Administrator'}, {'id': '3', 'name': 'Operator'}, {'id': '4', 'name': 'VM Administrator'}, {'id': '5', 'name': 'Security Administrator'}, {'id': '6', 'name': 'Storage Operator'}]) + Provides details of all roles. + + + id (, str, ) + ID of the role. + + + name (, str, ) + Name of the role. + + + +SecurityConfig (When security_config is in a given gather_subset, list, [{'id': '1'}]) + Provides details of all security configs. + + + id (, str, ) + ID of the security config. + + + +SMBShares (When smb_share is in a given gather_subset, list, [{'id': '72ef39a0-09b3-5339-c8bb-16c6ac7490fc', 'name': 'test_smb'}]) + Provides details of all smb shares. + + + id (, str, ) + ID of the smb share. + + + name (, str, ) + name of the smb share. + + + +SMTPConfig (When smtp_config is in a given gather_subset, list, [{'id': '0'}]) + Provides details of all smtp config. + + + id (, str, ) + ID of the smtp config. + + + +SnapshotRules (When snapshot_rule is in a given gather_subset, list, [{'id': 'e1b1bc3e-f8a1-4c81-a143-9ffd6af55837', 'name': 'Snapshot Rule Test'}]) + Provides details of all snapshot rules. + + + id (, str, ) + ID of the snapshot rule. + + + name (, str, ) + Name of the snapshot rule. + + + +VolumeGroups (When vg is in a given gather_subset, list, [{'id': 'faaa8370-c62e-4fa2-b8ca-7f54419a5b40', 'name': 'Volume Group Test'}]) + Provides details of all volume groups. + + + id (, str, ) + ID of the volume group. + + + name (, str, ) + Name of the volume group. + + + +Volumes (When vol is in a given gather_subset, list, [{'id': '01854336-94ef-4df9-b1e7-0a729ca7c944', 'name': 'test_vol'}]) + Provides details of all volumes. + + + id (, str, ) + ID of the volume. + + + name (, str, ) + Name of the volume. + + + +TreeQuotas (When tree_quota is in a given gather_subset, list, [{'id': '00000003-0fe0-0001-0000-0000e8030000'}]) + Provides details of all tree quotas. + + + id (, str, ) + ID of the tree quota. + + + path (, str, ) + Path of the tree quota. + + + +UserQuotas (When user_quota is in a given gather_subset, list, [{'id': '00000003-0708-0000-0000-000004000080'}]) + Provides details of all user quotas. + + + id (, str, ) + ID of the user quota. + + + +vCenter (When vCenter is in a given gather_subset, list, [{'id': '0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd', 'instance_uuid': '0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd', 'address': '10.x.x.x', 'username': 'administrator', 'version': '7.0.3', 'vendor_provider_status': 'Online', 'vendor_provider_status_l10n': 'Online', 'virtual_machines': [], 'datastores': [], 'vsphere_hosts': []}]) + Provide details of all vCenters. + + + id (, str, ) + Unique identifier of vCenter. + + + instance_uuid (, str, ) + UUID instance of vCenter. + + + address (, str, ) + IP address of vCenter host, in IPv4, IPv6 or hostname format. + + + username (, str, ) + Username to login to vCenter. + + + version (, str, ) + Version of vCenter including its build number. Was added in PowerStore version 3.0.0.0. + + + vendor_provider_status (, str, ) + General status of the VASA vendor provider in vCenter. + + + vendor_provider_status_l10n (, str, ) + Localized message string corresponding to vendor_provider_status. + + + virtual_machines (, list, ) + Virtual Machine associated with vCenter. + + + datastores (, list, ) + Datastores that exists on a specific vCenter. Was added in PowerStore version 3.0.0.0. + + + vsphere_hosts (, list, ) + All vSphere hosts that exists on a specific vCenter. Was added in PowerStore version 3.0.0.0. + + + +VirtualVolume (When virtual_volume is in a given gather_subset, list, [{'id': '85643b54-9429-49ee-b7c3-b061fcdaab7c', 'name': 'test-centos_2.vmdk', 'size': 17179869184, 'type': 'Primary', 'usage_type': 'Data', 'appliance_id': 'A1', 'storage_container_id': '4dff1460-4d1e-48b6-98d8-cae8d7bf63b5', 'io_priority': 'Medium', 'profile_id': 'f4e5bade-15a2-4805-bf8e-52318c4ce443', 'replication_group_id': None, 'creator_type': 'User', 'is_readonly': False, 'migration_session_id': None, 'virtual_machine_uuid': '503629e5-8677-b26f-bf2d-e9f639bcc77f', 'family_id': '9ce8d828-14e3-44f8-bde1-a97f440a7259', 'parent_id': None, 'source_id': None, 'source_timestamp': None, 'creation_timestamp': '2022-12-27T10:01:32.622+00:00', 'naa_name': 'naa.68ccf09800918d7f008769d29bc6a43a', 'is_replication_destination': False, 'location_history': None, 'protection_policy_id': None, 'nsid': 5114, 'nguid': 'nguid.918d7f008769d29b8ccf096800c6a43a', 'type_l10n': 'Primary', 'usage_type_l10n': 'Data', 'io_priority_l10n': 'Medium', 'creator_type_l10n': 'User', 'host_virtual_volume_mappings': []}]) + Provides details of all virtual volumes. + + + id (, str, ) + The unique identifier of the virtual volume. + + + name (, str, ) + The name of the virtual volume, based on metadata provided by vSphere. + + + size (, int, ) + The size of the virtual volume in bytes. + + + type (, str, ) + The logical type of a virtual volume. + + + usage_type (, str, ) + VMware's usage of the vVol. + + + appliance_id (, str, ) + The appliance where the virtual volume resides. + + + storage_container_id (, str, ) + The storage container where the virtual volume resides. + + + io_priority (, str, ) + The I/O priority for quality of service rules. + + + profile_id (, str, ) + The ID of the storage profile governing this virtual volume. + + + replication_group_id (, str, ) + The unique identifier of the replication group object that this virtual volume belongs to. + + + creator_type (, str, ) + Creator type of the storage resource. + + User - A resource created by a user. + + System - A resource created by the replication engine. + + Scheduler - A resource created by the snapshot scheduler. + + + is_readonly (, bool, ) + Indicates whether the virtual volume is read-only. + + + migration_session_id (, str, ) + If the virtual volume is part of a migration activity, the session ID for that migration. + + + virtual_machine_uuid (, str, ) + UUID of the virtual machine that owns this virtual volume. + + + family_id (, str, ) + Family id of the virtual volume. + + + parent_id (, str, ) + For snapshots and clones, the ID of the parent virtual volume. + + + source_id (, str, ) + Id of the virtual volume from which the content has been sourced. + + + source_timestamp (, str, ) + The source data time-stamp of the virtual volume. + + + creation_timestamp (, str, ) + Timestamp of the moment virtual volume was created at. + + + naa_name (, str, ) + The NAA name used by hosts for I/O. + + + is_replication_destination (, bool, ) + Indicates whether virtual volume is replication destination or not. + + + location_history (, complex, ) + Storage resource location history. + + + from_appliance_id (, str, ) + Unique identifier of the appliance from which the volume was relocated. + + + to_appliance_id (, str, ) + Unique identifier of the appliance to which the volume was relocated. + + + reason (, str, ) + Reason for storage resource relocation. + + Initial - Initial placement. + + Manual - Manual migration operation initiated by user. + + Recommended - Storage system recommended migration. + + + migrated_on (, str, ) + Time when the storage resource location changed. + + + reason_l10n (, str, ) + Localized message string corresponding to reason. + + + + protection_policy_id (, str, ) + The unique identifier of the protection policy applied to this virtual volume. + + + nsid (, str, ) + NVMe Namespace unique identifier in the NVMe subsystem. + + + nguid (, str, ) + NVMe Namespace globally unique identifier. + + + type_l10n (, str, ) + Localized message string corresponding to type. + + + usage_type_l10n (, str, ) + Localized message string corresponding to usage_type. + + + io_priority_l10n (, str, ) + Localized message string corresponding to io_priority. + + + creator_type_l10n (, str, ) + Localized message string corresponding to creator_type. + + + host_virtual_volume_mappings (, complex, ) + Virtual volume mapping details. + + + id (, str, ) + Unique identifier of a mapping between a host and a virtual volume. + + + host_id (, str, ) + Unique identifier of a host attached to a virtual volume. + + + host_group_id (, str, ) + Unique identifier of a host group attached to a virtual volume. + + + virtual_volume_id (, str, ) + Unique identifier of the virtual volume to which the host is attached. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) +- Vivek Soni (@v-soni11) +- Akash Shendge (@shenda1) +- Bhavneet Sharma (@sharmb5) +- Trisha Datta (@trisha-dell) + diff --git a/docs/modules/job.rst b/docs/modules/job.rst new file mode 100644 index 0000000..4388081 --- /dev/null +++ b/docs/modules/job.rst @@ -0,0 +1,219 @@ +.. _job_module: + + +job -- Manage jobs for PowerStore +================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing jobs on PowerStore Storage System includes getting details of job. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + job_id (True, str, None) + The ID of the job. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get Job Details + dellemc.powerstore.job: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + job_id: "a544981c-e94a-40ab-9eae-e578e182d2bb" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +job_details (When job exists., complex, {'description_l10n': 'Modify network parameters.', 'end_time': '2022-01-06T07:39:05.846+00:00', 'estimated_completion_time': None, 'id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'parent_id': None, 'phase': 'Completed', 'phase_l10n': 'Completed', 'progress_percentage': 100, 'resource_action': 'modify', 'resource_action_l10n': 'modify', 'resource_id': 'nw6', 'resource_name': None, 'resource_type': 'network', 'resource_type_l10n': 'network', 'response_body': None, 'response_status': None, 'response_status_l10n': None, 'root_id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'start_time': '2022-01-06T07:39:05.47+00:00', 'state': 'COMPLETED', 'state_l10n': 'Completed', 'step_order': 23792565, 'user': 'admin'}) + The job details. + + + id (, str, ) + Unique identifier of the job. + + + resource_action (, str, ) + User-specified action to be performed on the given resource. + + + resource_type (, str, ) + Resource Type for the given resource. + + + resource_id (, str, ) + Unique identifier of the resource on which the job is operating. + + + resource_name (, str, ) + Name of the resource on which the job is operating. + + + description_l10n (, str, ) + Description of the job. + + + state (, str, ) + Current status of the job. + + + start_time (, str, ) + Date and time when the job execution started. + + + phase (, str, ) + Current status of the job. + + + end_time (, str, ) + Date and time when the job execution completed. + + + estimated_completion_time (, str, ) + Estimated completion date and time. + + + progress_percentage (, int, ) + Percent complete of the job. + + + parent_id (, str, ) + Unique identifier of the parent job, if applicable. + + + root_id (, str, ) + Unique identifier of the root job, if applicable. The root job is the job at the top of the parent hierarchy. + + + response_body (, complex, ) + Base response object. + + + response_type (, str, ) + Job error response. + + + messages (, complex, ) + The details of the error response. + + + code (, str, ) + Hexadecimal code of the error. + + + severity (, str, ) + Type of the severity. + + + arguments (, list, ) + Values involved in the error. + + + message_l10n (, str, ) + The description of the error. + + + + + user (, str, ) + Name of the user associated with the job. + + + response_status (, str, ) + Possible HTTP status values of completed or failed jobs. + + + step_order (, int, ) + Order of a given job step with respect to its siblings within the job hierarchy. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) + diff --git a/docs/modules/ldap_account.rst b/docs/modules/ldap_account.rst new file mode 100644 index 0000000..d535f8c --- /dev/null +++ b/docs/modules/ldap_account.rst @@ -0,0 +1,220 @@ +.. _ldap_account_module: + + +ldap_account -- Manage LDAP Account for PowerStore +================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing LDAP accounts on PowerStore Storage System includes creating an LDAP account, getting details of LDAP accounts, modifying an LDAP account, and deleting an LDAP account. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + ldap_account_id (optional, int, None) + Unique identifier of the LDAP account. + + + ldap_account_name (optional, str, None) + Name of the new LDAP account to be created. + + This has to match to the LDAP user or group in LDAP server to which the LDAP account is mapped. + + + ldap_domain_id (optional, int, None) + Unique identifier of the LDAP domain to which LDAP user or group belongs. + + + ldap_domain_name (optional, str, None) + Name of the LDAP domain to which LDAP user or group belongs. + + + role_id (optional, int, None) + Unique identifier of the role to which the new LDAP account will be mapped. + + + role_name (optional, str, None) + Name of the role to which the new LDAP account will be mapped. + + + ldap_account_type (optional, str, None) + Type of LDAP account. + + + state (True, str, None) + Define whether the LDAP account should exist or not. + + For Delete operation only, it should be set to "absent". + + For all other operations except delete, it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create an LDAP account + dellemc.powerstore.ldap_account: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_account_name: "ldap_user_account_1" + ldap_domain_id: "1" + role_name: "Administrator" + ldap_account_type: "User" + state: "present" + + - name: Get the details of the LDAP account by name + dellemc.powerstore.ldap_account: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_account_name: "ldap_user_account_1" + state: "present" + + - name: Get the details of the LDAP account by id + dellemc.powerstore.ldap_account: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_account_id: "3" + state: "present" + + - name: Modify an LDAP account + dellemc.powerstore.ldap_account: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_account_name: "ldap_user_account_1" + role_name: "2" + state: "present" + + - name: Delete an LDAP account + dellemc.powerstore.ldap_account: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_account_id: "3" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +ldap_account_details (When LDAP account exists., complex, {'id': '5', 'role_id': '1', 'domain_id': '2', 'name': 'sample_ldap_user', 'type': 'User', 'type_l10n': 'User', 'dn': 'cn=sample_ldap_user,dc=ldap,dc=com'}) + Details of the LDAP account. + + + id (, int, ) + Unique identifier of the LDAP account. + + + role_id (, int, ) + Unique identifier of the role to which the LDAP account is mapped. + + + domain_id (, int, ) + Unique identifier of the LDAP domain to which LDAP user or group belongs. + + + name (, str, ) + Name of the LDAP account. + + + type (, str, ) + Type of LDAP account. + + + dn (, str, ) + Types of directory service protocol. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/ldap_domain.rst b/docs/modules/ldap_domain.rst new file mode 100644 index 0000000..3758f20 --- /dev/null +++ b/docs/modules/ldap_domain.rst @@ -0,0 +1,406 @@ +.. _ldap_domain_module: + + +ldap_domain -- Manage LDAP domain for PowerStore +================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing LDAP domain on PowerStore Storage System includes creating LDAP domain, getting details of LDAP domain, modifying LDAP domain, verifying LDAP domain and deleting LDAP domain. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + ldap_domain_name (optional, str, None) + Name of the LDAP authority to construct the LDAP server configuration. + + Mandatory for the create operation. + + + ldap_domain_id (optional, int, None) + Unique identifier of the LDAP domain configuration. + + + ldap_servers (optional, list, None) + List of IP addresses of the LDAP servers for the domain. + + + ldap_server_state (optional, str, None) + State of the LDAP server. + + The ldap_servers and ldap_server_state are required together. + + + ldap_server_port (optional, int, None) + Port number used to connect to the LDAP Server. + + + protocol (optional, str, None) + Types of directory service protocol. + + + ldap_server_type (optional, str, None) + Types of the LDAP server. + + + bind_user (optional, str, None) + Distinguished Name (DN) of the user to be used when binding; that is, authenticating and setting up the connection to the LDAP server. + + Mandatory for the create operation. + + + bind_password (optional, str, None) + Password to use when binding a new LDAP session. + + Mandatory for the create operation. + + + ldap_timeout (optional, int, None) + Timeout for establishing a connection to an LDAP server. + + + is_global_catalog (optional, bool, None) + Whether or not the catalog is global. + + + ldap_domain_user_settings (optional, dict, None) + User settings of LDAP domain. + + + user_id_attribute (optional, str, None) + Name of the LDAP attribute whose value indicates the unique identifier of the user. + + Default value is sAMAccountName. + + + user_object_class (optional, str, None) + LDAP object class for users. + + Default value is user. + + + user_search_path (optional, str, None) + Path used to search for users on the directory server. + + Search path is empty, if global catalog is enabled. + + + + ldap_domain_group_settings (optional, dict, None) + Group settings of LDAP domain. + + + group_name_attribute (optional, str, None) + Name of the LDAP attribute whose value indicates the group name. + + Default value is cn. + + + group_member_attribute (optional, str, None) + Name of the LDAP attribute whose value contains the names of group members within a group. + + Default value is member. + + + group_object_class (optional, str, None) + LDAP object class for groups. + + Default value is group. + + + group_search_path (optional, str, None) + Path used to search for groups on the directory server. + + Search path is empty, if global catalog is enabled. + + + group_search_level (optional, int, None) + Nested search level for performing group search. + + Default value is 0. + + + + verify_configuration (optional, bool, False) + Indicates whether to perform the verify LDAP domain configuration or not. + + + state (True, str, None) + Define whether the LDAP domain configuration should exist or not. + + For Delete operation only, it should be set to "absent". + + For all other operations except delete, it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The 'is_global_catalog' option can be enabled only for AD server type. + - To use LDAPS protocol, the pre-requisite is to upload the certificate of LDAP server on PowerStore array. + - Verify operation does not support idempotency. + - The check_mode is supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create LDAP domain + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + domain_name: "{{domain_name}}" + ldap_servers: ["10.xxx.xx.xx"] + protocol: "LDAP" + ldap_server_type: "OpenLDAP" + bind_user: "{{bind_user}}" + bind_password: "{{bind_password}}" + ldap_domain_user_settings: + user_search_path: "cn=Users" + ldap_domain_group_settings: + group_search_path: "cn=Users" + ldap_server_state: "present-in-domain" + state: "present" + + - name: Get LDAP domain details using ID + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_id: 4 + state: "present" + + - name: Get LDAP domain details using name + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_name: "{{ldap_domain_name}}" + state: "present" + + - name: Verify LDAP domain configuration + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_id: 4 + verify_configuration: True + state: "present" + + - name: Delete LDAP domain configuration + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_id: 4 + state: "absent" + + - name: Create LDAP domain with AD server type + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_name: "{{domain_name}}" + ldap_servers: + - "10.xxx.xx.xx" + ldap_server_state: "present-in-domain" + ldap_server_type: "AD" + bind_user: "{{bind_user}}" + bind_password: "{{bind_password}}" + is_global_catalog: True + ldap_server_port: 3268 + protocol: "LDAP" + ldap_domain_user_settings: + user_search_path: "" + ldap_domain_group_settings: + group_search_path: "" + state: "present" + + - name: Get LDAP domain details using domain name + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_name: "{{domain_name}}" + state: "present" + + - name: Delete LDAP domain using domain name + dellemc.powerstore.ldap_domain: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + ldap_domain_name: "{{domain_name}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +ldap_domain_details (When LDAP domain configuration exists., complex, {'id': '9', 'domain_name': 'domain.com', 'port': 636, 'protocol': 'LDAPS', 'protocol_l10n': 'LDAPS', 'bind_user': 'cn=ldapadmin,dc=domain,dc=com', 'ldap_timeout': 300000, 'ldap_server_type': 'OpenLDAP', 'ldap_server_type_l10n': 'OpenLDAP', 'is_global_catalog': False, 'user_id_attribute': 'uid', 'user_object_class': 'inetOrgPerson', 'user_search_path': 'dc=domain,dc=com', 'group_name_attribute': 'cn', 'group_member_attribute': 'member', 'group_object_class': 'groupOfNames', 'group_search_path': 'dc=domain,dc=com', 'group_search_level': 0, 'ldap_servers': ['10.xxx.xx.xxx']}) + Details of the LDAP domain configuration. + + + id (, str, ) + Unique identifier of the new LDAP server configuration. + + + domain_name (, str, ) + Name of the LDAP authority to construct the LDAP server configuration. + + + ldap_servers (, list, ) + List of IP addresses of the LDAP servers for the domain. IP addresses are in IPv4 format. + + + port (, int, ) + Port number used to connect to the LDAP server(s). + + + ldap_server_type (, str, ) + Types of LDAP server. + + + protocol (, str, ) + Types of directory service protocol. + + + bind_user (, str, ) + Distinguished Name (DN) of the user to be used when binding. + + + ldap_timeout (, int, ) + Timeout for establishing a connection to an LDAP server. Default value is 30000 (30 seconds). + + + is_global_catalog (, bool, ) + Whether or not the catalog is global. Default value is false. + + + user_id_attribute (, str, ) + Name of the LDAP attribute whose value indicates the unique identifier of the user. + + + user_object_class (, str, ) + LDAP object class for users. + + + user_search_path (, str, ) + Path used to search for users on the directory server. + + + group_name_attribute (, str, ) + Name of the LDAP attribute whose value indicates the group name. + + + group_member_attribute (, str, ) + Name of the LDAP attribute whose value contains the names of group members within a group. + + + group_object_class (, str, ) + LDAP object class for groups. + + + group_search_path (, str, ) + Path used to search for groups on the directory server. + + + group_search_level (, int, ) + Nested search level for performing group search. + + + ldap_server_type_l10n (, str, ) + Localized message string corresponding to ldap_server_type. + + + protocol_l10n (, str, ) + Localized message string corresponding to protocol. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) + diff --git a/docs/modules/local_user.rst b/docs/modules/local_user.rst new file mode 100644 index 0000000..368f16e --- /dev/null +++ b/docs/modules/local_user.rst @@ -0,0 +1,233 @@ +.. _local_user_module: + + +local_user -- Local user operations for PowerStore Storage System +================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Supports the provisioning operations on a Local user such as create, modify, delete and get the details of a local user. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + user_name (optional, str, None) + Name of the local user account. Mutually exclusive with user_id. + + Mandatory only for create operation. + + + user_id (optional, str, None) + Unique identifier of the local user account. + + Mutually exclusive with user_name. + + + user_password (optional, str, None) + Password for the new local user account to be created. + + Mandatory only for create operation. + + + new_password (optional, str, None) + New password for the existing local user account. + + + role_name (optional, str, None) + The name of the role to which the local user account will be mapped. + + It is mutually exclusive with role_id. + + + role_id (optional, int, None) + The unique identifier of the role to which the local user account will be mapped. + + It is mutually exclusive with role_name. + + + is_locked (optional, bool, None) + Whether the user account is locked or not. + + Defaults to false at creation time. + + + state (True, str, None) + Define whether the local user should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create local user + dellemc.powerstore.local_user: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + user_name: "ansible_user_1" + user_password: "Password123#" + role_name: "role_1" + is_locked: False + state: "present" + + - name: Get the details local user with user id + dellemc.powerstore.local_user: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + user_id: "{{user_id}}" + state: "present" + + - name: Get the details local user with user name + dellemc.powerstore.local_user: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + user_name: "ansible_user_1" + state: "present" + + - name: Modify attributes of local user + dellemc.powerstore.local_user: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + user_name: "ansible_user_1" + user_password: "Password123#" + new_password: "Ansible123#" + role_id: 4 + is_locked: True + state: "present" + + - name: Delete local user + dellemc.powerstore.local_user: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + user_name: "ansible_user_1" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +local_user_details (When local user exists, complex, {'id': '272', 'is_built_in': False, 'is_default_password': False, 'is_locked': False, 'name': 'sampleuser', 'role_id': '1', 'role_name': 'Administrator'}) + Details of the local user. + + + id (, str, ) + The system generated ID given to the local user. + + + name (, str, ) + Name of the local user. + + + is_built_in (, bool, ) + Whether the user account is built-in or not. + + + is_locked (, bool, ) + Whether the user account is locked or not. Defaults to false at creation time. + + + is_default_password (, bool, ) + Whether the user account has a default password or not. Only applies to default user accounts + + + role_id (, str, ) + Unique identifier of the role local user account is mapped to. + + + role_name (, str, ) + Name of the role to which local user account is mapped. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) + diff --git a/docs/modules/nasserver.rst b/docs/modules/nasserver.rst new file mode 100644 index 0000000..f0835c5 --- /dev/null +++ b/docs/modules/nasserver.rst @@ -0,0 +1,285 @@ +.. _nasserver_module: + + +nasserver -- NAS Server operations for PowerStore Storage system +================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Supports getting the details and modifying the attributes of a NAS server. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + nas_server_name (optional, str, None) + Name of the NAS server. Mutually exclusive with nas_server_id. + + + nas_server_id (optional, str, None) + Unique id of the NAS server. Mutually exclusive with nas_server_name. + + + description (optional, str, None) + Description of the NAS server. + + + nas_server_new_name (optional, str, None) + New name of the NAS server for a rename operation. + + + current_node (optional, str, None) + Unique identifier or name of the node on which the NAS server is running. + + + preferred_node (optional, str, None) + Unique identifier or name of the preferred node for the NAS server. The initial value (on NAS server create) is taken from the current node. + + + current_unix_directory_service (optional, str, None) + Define the Unix directory service used for looking up identity information for Unix such as UIDs, GIDs, net groups, and so on. + + + default_unix_user (optional, str, None) + Default Unix user name used for granting access in case of Windows to Unix user mapping failure. When empty, access in such case is denied. + + + default_windows_user (optional, str, None) + Default Windows user name used for granting access in case of Unix to Windows user mapping failure. When empty, access in such case is denied. + + + protection_policy (optional, str, None) + Name/ID of the protection policy applied to the nas server. + + Policy can be removed by passing an empty string in the protection_policy parameter. + + + state (True, str, None) + Define whether the nas server should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - Adding/Removing protection policy to/from a NAS server is supported for PowerStore version 3.0.0 and above. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get details of NAS Server by name + dellemc.powerstore.nasserver: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nas_server_name: "{{nas_server_name}}" + state: "present" + + - name: Get Details of NAS Server by ID + dellemc.powerstore.nasserver: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nas_server_id: "{{nas_id}}" + state: "present" + + - name: Rename NAS Server by Name + dellemc.powerstore.nasserver: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nas_server_name: "{{nas_server_name}}" + nas_server_new_name : "{{nas_server_new_name}}" + state: "present" + + - name: Modify NAS Server attributes by ID + dellemc.powerstore.nasserver: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nas_server_id: "{{nas_id}}" + current_unix_directory_service: "LOCAL_FILES" + current_node: "{{cur_node_n1}}" + preferred_node: "{{prefered_node}}" + protection_policy: "protection_policy_1" + state: "present" + + - name: Remove protection policy + dellemc.powerstore.nasserver: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nas_server_id: "{{nas_id}}" + protection_policy: "" + state: "present" + + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +nasserver_details (When nas server exists, complex, {'backup_IPv4_interface_id': None, 'backup_IPv6_interface_id': None, 'current_node': {'id': 'N2', 'name': 'Appliance-WND8977-node-B'}, 'current_node_id': 'Appliance-WND8977-node-B', 'current_preferred_IPv4_interface_id': '60c02-b5d8-9d9b-7e6f-feb93c9', 'current_preferred_IPv6_interface_id': None, 'current_unix_directory_service': 'LDAP', 'current_unix_directory_service_l10n': 'LDAP', 'default_unix_user': None, 'default_windows_user': None, 'description': '', 'file_interfaces': [{'id': '0c05652-b5d8-9d9b-7e6f-fe8be1eb93c9', 'ip_address': '1.2.3.4', 'name': 'PROD001_827ee18708a9_6'}], 'file_ldaps': [{'id': '60c05ba8-362e-159a-0205-ee6f605dfe5a'}], 'file_nises': [], 'file_systems': [{'id': '61c55b57-4a70-08dd-a240-96e8abdcbab0', 'name': 'sample_fs'}], 'id': '60c0564a-4a6e-04b6-4d5e-fe8be1eb93c9', 'is_auto_user_mapping_enabled': True, 'is_username_translation_enabled': False, 'name': 'ansible_nas_server_2', 'nfs_servers': [{'id': '60c05653-4fd3-2033-2da0-ee6f605dfe5a'}], 'operational_status': 'Started', 'operational_status_l10n': 'Started', 'preferred_node': {'id': 'N2', 'name': 'Appliance-WND8977-node-B'}, 'preferred_node_id': 'Appliance-WND8977-node-B', 'production_IPv4_interface_id': '60c05652-b5d8-9d9b-7e6f-fe8be1eb93c', 'production_IPv6_interface_id': None, 'protection_policy_id': None, 'smb_servers': [{'id': '60c05c18-6806-26ae-3b0d-fe8be1eb93c'}]}) + Details about the nas server. + + + id (, str, ) + The system generated ID given to the nas server. + + + name (, str, ) + Name of the nas server. + + + description (, str, ) + Additional information about the nas server. + + + operational_status (, str, ) + NAS server operational status. + + + current_node (, dict, ) + Unique identifier and name of the node on which the NAS server is running. + + + preferred_node (, dict, ) + Unique identifier and name of the preferred node for the NAS server. + + + default_unix_user (, str, ) + Default Unix user name used for granting access in case of Windows to Unix user mapping failure. + + + current_unix_directory_service (, str, ) + Define the Unix directory service used for looking up identity information for Unix such as UIDs, GIDs, net groups, and so on. + + + is_username_translation_enabled (, bool, ) + Enable the possibility to match a windows account to a Unix account with different names. + + + production_IPv4_interface_id (, str, ) + Unique identifier of the preferred IPv4 production interface. + + + production_IPv6_interface_id (, str, ) + Unique identifier of the preferred IPv6 production interface. + + + backup_IPv4_interface_id (, str, ) + Unique identifier of the preferred IPv4 backup interface. + + + backup_IPv6_interface_id (, str, ) + Unique identifier of the preferred IPv6 backup interface. + + + file_interfaces (, dict, ) + This is the inverse of the resource type file_interface association. Will return the id,name & ip_address of the associated file interface. + + + nfs_servers (, str, ) + This is the inverse of the resource type nfs_server association. + + + smb_servers (, str, ) + This is the inverse of the resource type smb_server association. + + + file_ldaps (, str, ) + This is the inverse of the resource type file_ldap association. + + + file_systems (, dict, ) + This is the inverse of the resource type file_system association. + + + protection_policy_id (, str, ) + Id of the protection policy applied to the nas server. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) + diff --git a/docs/modules/network.rst b/docs/modules/network.rst new file mode 100644 index 0000000..b2abb3e --- /dev/null +++ b/docs/modules/network.rst @@ -0,0 +1,456 @@ +.. _network_module: + + +network -- Manage networks for PowerStore +========================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing networks on PowerStore Storage System includes getting details of network, modifying attributes of network and adding/removing IP ports to/from storage network. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + network_name (optional, str, None) + The name of the network. + + This parameter is added in 2.0.0.0. + + Specify either network_name or network_id for any operation. + + + network_id (optional, str, None) + The ID of the network. + + + vlan_id (optional, int, None) + The ID of the VLAN. + + + gateway (optional, str, None) + Network gateway in IPv4 format. IP version. + + Specify empty string to remove the gateway. + + + prefix_length (optional, int, None) + Network prefix length. + + + new_cluster_mgmt_address (optional, str, None) + New cluster management IP address in IPv4 format. + + + storage_discovery_address (optional, str, None) + New storage discovery IP address in IPv4 format. + + Specify empty string to remove the storage discovery IP address. + + + mtu (optional, int, None) + Maximum Transmission Unit (MTU) packet size set on network interfaces, in bytes. + + + new_name (optional, str, None) + New name of the network. + + + addresses (optional, list, None) + IP addresses to add/remove in IPv4 format. + + + current_address (optional, str, None) + Existing IPv4 address. + + + new_address (optional, str, None) + New IPv4 address. + + + + ports (optional, list, None) + Ports to be mapped/unmapped to/from the storage network. + + + port_state (optional, str, None) + Specifies whether port should mapped/unmapped from the storage network. + + + vasa_provider_credentials (optional, dict, None) + Credentials required for re-registering the VASA vendor provider during the reconfiguration of the cluster management IP address. + + + username (True, str, None) + VASA vendor provider user name. + + + password (True, str, None) + VASA vendor provider password. + + + + esxi_credentials (optional, list, None) + Credentials required for re-registering the ESXi hosts in the vCenter. + + It should be passed only when ESXi host addresses or management network VLAN / prefix / gateway are changed during the reconfiguration of the PowerStore X model appliances. + + This parameter is applicable only for PowerStore X model. + + This parameter will be ignored if passed for PowerStore T model. + + + node_id (True, str, None) + Node identifier corresponding to the ESXi host. + + + password (True, str, None) + ESXi host root password. + + + + wait_for_completion (optional, bool, False) + Flag to indicate if the operation should be run synchronously or asynchronously. True signifies synchronous execution. By default, modify operation will run asynchronously. + + + state (True, str, None) + Define whether the network exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - It is recommended to perform task asynchronously while changing cluster management address. + - Idempotency is not supported for vasa_provider_credentials and esxi_credentials. + - For PowerStore X model, vasa_provider_credentials has to be specified along with new_cluster_mgmt_address. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get network details using ID + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_id: "NW1" + state: "present" + + - name: Get network details using name + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_name: "Default Management Network" + state: "present" + + - name: Rename the storage network + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_name: "Default Storage Network" + new_name: "iSCSI Network" + wait_for_completion: True + state: "present" + + - name: Replace the IP's in the management network and re-register VASA vendor provider + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_id: "NW1" + addresses: + - current_address: "100.230.x.x" + new_address: "100.230.x.x" + - current_address: "100.230.x.x" + new_address: "100.230.x.x" + - current_address: "100.230.x.x" + new_address: "100.230.x.x" + new_cluster_mgmt_address: "100.230.x.x" + vasa_provider_credentials: + username: "vmadmin" + password: "{{vm_password}}" + state: "present" + + - name: Map port to the storage network + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_id: "NW6" + ports: + - "IP1" + port_state: "present-in-network" + state: "present" + + - name: Unmap port from the storage network + dellemc.powerstore.network: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_id: "NW6" + ports: + - "IP1" + port_state: "absent-in-network" + state: "present" + + - name: Replace the IP's in the management network and re-register VASA vendor + provider for X model + dellemc.powerstore.network: + array_ip: "{{array_ip1}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + network_id: "NW1" + vlan_id: 0 + gateway: "100.231.x.x" + mtu: 1500 + prefix_length: 24 + addresses: + - current_address: "100.230.x.x" + new_address: "100.231.x.x" + - current_address: "100.230.x.x" + new_address: "100.231.x.x" + - current_address: "100.230.x.x" + new_address: "100.231.x.x" + - current_address: "100.230.x.x" + new_address: "100.231.x.x" + - current_address: "100.230.x.x" + new_address: "100.231.x.x" + new_cluster_mgmt_address: "100.231.x.x" + vasa_provider_credentials: + username: "vmadmin" + password: "{{vm_password}}" + esxi_credentials: + - "node_id": "N1" + "password": "{{node_password}}" + - "node_id": "N2" + "password": "{{node_password}}" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +job_details (When asynchronous task is performed., complex, {'description_l10n': 'Modify network parameters.', 'end_time': '2022-01-06T07:39:05.846+00:00', 'estimated_completion_time': None, 'id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'parent_id': None, 'phase': 'Completed', 'phase_l10n': 'Completed', 'progress_percentage': 100, 'resource_action': 'modify', 'resource_action_l10n': 'modify', 'resource_id': 'nw6', 'resource_name': None, 'resource_type': 'network', 'resource_type_l10n': 'network', 'response_body': None, 'response_status': None, 'response_status_l10n': None, 'root_id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'start_time': '2022-01-06T07:39:05.47+00:00', 'state': 'COMPLETED', 'state_l10n': 'Completed', 'step_order': 23792565, 'user': 'admin'}) + The job details. + + + id (, str, ) + The ID of the job. + + + +network_details (When network exists., complex, {'cluster_details': {'appliance_count': 1, 'chap_mode': 'Disabled', 'compatibility_level': 10, 'global_id': 'PS00d01e1bb312', 'id': 0, 'is_encryption_enabled': True, 'management_address': '10.xx.xx.xx', 'master_appliance_id': 'A1', 'name': 'WN-D8977', 'physical_mtu': 1500, 'service_config_details': None, 'state': 'Configured', 'state_l10n': 'Configured', 'storage_discovery_address': '10.xx.xx.xx', 'system_time': '2022-02-04T11:18:37.441Z'}, 'gateway': '10.xx.xx.xx', 'id': 'NW1', 'ip_version': 'IPv4', 'ip_version_l10n': 'IPv4', 'member_ips': [{'address': '10.xx.xx.xx', 'appliance_id': None, 'id': 'IP1', 'ip_port_id': None, 'name': 'Default Management Network (10.xx.xx.xx)', 'network_id': 'NW1', 'node_id': None, 'purposes': ['Mgmt_Cluster_Floating'], 'purposes_l10n': ['Mgmt_Cluster_Floating']}, {'address': '10.xx.xx.xx', 'appliance_id': None, 'id': 'IP2', 'ip_port_id': None, 'name': 'Default Management Network (10.xx.xx.xx)', 'network_id': 'NW1', 'node_id': None, 'purposes': ['Mgmt_Appliance_Floating'], 'purposes_l10n': ['Mgmt_Appliance_Floating']}], 'mtu': 1500, 'name': 'Default Management Network', 'prefix_length': 24, 'purposes': [], 'purposes_l10n': None, 'type': 'Management', 'type_l10n': 'Management', 'vcenter_details': {'address': '10.xx.xx.xx', 'id': '0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd', 'instance_uuid': 'c4c14fbb-828b-40f3-99bb-5bd4db723516', 'username': 'administrator@vsphere.local', 'vendor_provider_status': 'Online', 'vendor_provider_status_l10n': 'Online'}, 'vlan_id': 0}) + The network details. + + + name (, str, ) + The name of the network. + + + id (, str, ) + The ID of the network. + + + gateway (, str, ) + The gateway of the network. + + + vlan_id (, int, ) + VLAN identifier. + + + prefix_length (, int, ) + Network prefix length. + + + mtu (, int, ) + Maximum Transmission Unit (MTU) packet size set on network interfaces, in bytes. + + + ip_version (, str, ) + IP protocol version + + + type (, str, ) + Network type + + + purposes (, list, ) + Purposes of the network. + + + cluster_details (, complex, ) + The details of the cluster. + + + id (, str, ) + The unique identifier of the cluster. + + + name (, str, ) + The name of the cluster. + + + management_address (, str, ) + The floating management IP address for the cluster in IPv4 or IPv6 format. + + + storage_discovery_address (, str, ) + The floating storage discovery IP address for the cluster in IPv4 or IPv6 format. + + + appliance_count (, int, ) + Number of appliances configured in this cluster. + + + + member_ips (, complex, ) + Properties of the IP pool address. + + + id (, str, ) + Unique identifier of the IP address. + + + name (, str, ) + Name of the IP address. + + + network_id (, str, ) + Unique identifier of the network to which the IP address belongs. + + + ip_port_id (, str, ) + Unique identifier of the port that uses this IP address to provide access to storage network services, such as iSCSI. This attribute can be set only for an IP address used by networks of type Storage. + + + appliance_id (, str, ) + Unique identifier of the appliance to which the IP address belongs. + + + node_id (, str, ) + Unique identifier of the cluster node to which the IP address belongs. + + + address (, str, ) + IP address value, in IPv4 or IPv6 format. + + + purposes (, list, ) + IP address purposes. + + + + vcenter_details (, complex, ) + Details of the vcenter. + + + address (, str, ) + IP address of vCenter host, in IPv4, IPv6, or hostname format. + + + id (, str, ) + Unique identifier of the vCenter instance. + + + instance_uuid (, str, ) + UUID instance of the vCenter. + + + username (, str, ) + User name to login to vCenter. + + + vendor_provider_status (, str, ) + General status of the VASA vendor provider in vCenter. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) + diff --git a/docs/modules/nfs.rst b/docs/modules/nfs.rst new file mode 100644 index 0000000..46eb54c --- /dev/null +++ b/docs/modules/nfs.rst @@ -0,0 +1,406 @@ +.. _nfs_module: + + +nfs -- Manage NFS exports for PowerStore +======================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing NFS exports on PowerStore Storage System includes creating new NFS Export, getting details of NFS export, modifying attributes of NFS export, and deleting NFS export. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + nfs_export_name (optional, str, None) + The name of the NFS export. + + Mandatory for create operation. + + Specify either nfs_export_name or nfs_export_id(but not both) for any operation. + + + nfs_export_id (optional, str, None) + The ID of the NFS export. + + + filesystem (optional, str, None) + The ID/Name of the filesystem for which the NFS export will be created. + + Either filesystem or snapshot is required for creation of the NFS Export. + + If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. + + If filesystem parameter is provided, then snapshot cannot be specified. + + + snapshot (optional, str, None) + The ID/Name of the Snapshot for which NFS export will be created. + + Either filesystem or snapshot is required for creation of the NFS Export. + + If snapshot name is specified, then nas_server is required to uniquely identify the snapshot. + + If snapshot parameter is provided, then filesystem cannot be specified. + + NFS export can be created only if access type of snapshot is "protocol". + + + nas_server (optional, str, None) + The NAS server. This could be the name or ID of the NAS server. + + + path (optional, str, None) + Local path to export relative to the NAS server root. + + With NFS, each export of a file_system or file_snap must have a unique local path. + + Mandatory while creating NFS export. + + + description (optional, str, None) + The description for the NFS export. + + + default_access (optional, str, None) + Default access level for all hosts that can access the Export. + + For hosts that need different access than the default, they can be configured by adding to the list. + + If default_access is not mentioned during creation, then NFS export will be created with No_Access. + + + no_access_hosts (optional, list, None) + Hosts with no access to the NFS export. + + + read_only_hosts (optional, list, None) + Hosts with read-only access to the NFS export. + + + read_only_root_hosts (optional, list, None) + Hosts with read-only access for root user to the NFS export. + + + read_write_hosts (optional, list, None) + Hosts with read and write access to the NFS export. + + + read_write_root_hosts (optional, list, None) + Hosts with read and write access for root user to the NFS export. + + + min_security (optional, str, None) + NFS enforced security type for users accessing an NFS export. + + If not specified at the time of creation, it will be set to SYS. + + + anonymous_uid (optional, int, None) + Specifies the user ID of the anonymous account. + + If not specified at the time of creation, it will be set to -2. + + + anonymous_gid (optional, int, None) + Specifies the group ID of the anonymous account. + + If not specified at the time of creation, it will be set to -2. + + + is_no_suid (optional, bool, None) + If set, do not allow access to set SUID. Otherwise, allow access. + + If not specified at the time of creation, it will be set to False. + + + host_state (optional, str, None) + Define whether the hosts can access the NFS export. + + Required when adding or removing host access from the export. + + + state (True, str, None) + Define whether the NFS export should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create NFS export (filesystem) + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_name: "{{export_name1}}" + filesystem: "{{filesystem}}" + nas_server: "{{nas_server}}" + path: "{{path1}}" + description: "sample description" + default_access: "NO_ACCESS" + no_access_hosts: + - "{{host5}}" + read_only_hosts: + - "{{host1}}" + read_only_root_hosts: + - "{{host2}}" + read_write_hosts: + - "{{host3}}" + read_write_root_hosts: + - "{{host4}}" + min_security: "SYS" + anonymous_uid: 1000 + anonymous_gid: 1000 + is_no_suid: True + host_state: "present-in-export" + state: "present" + + - name: Create NFS export Create NFS export for filesystem snapshot with mandatory parameters + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_name: "{{export_name2}}" + snapshot: "{{snapshot}}" + nas_server: "{{nas_server}}" + path: "{{path2}}" + state: "present" + + - name: Get NFS export details using ID + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_id: "{{export_id}}" + state: "present" + + - name: Add Read-Only and Read-Write hosts to NFS export + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_id: "{{export_id}}" + read_only_hosts: + - "{{host5}}" + read_write_hosts: + - "{{host6}}" + host_state: "present-in-export" + state: "present" + + - name: Remove Read-Only and Read-Write hosts from NFS export + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_id: "{{export_id}}" + read_only_hosts: + - "{{host1}}" + read_write_hosts: + - "{{host3}}" + host_state: "absent-in-export" + state: "present" + + - name: Modify the attributes of NFS export + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_id: "{{export_id}}" + description: "modify description" + default_access: "ROOT" + state: "present" + + - name: Delete NFS export using name + dellemc.powerstore.nfs: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + nfs_export_name: "{{export_name}}" + nas_server: "{{nas_server}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +nfs_export_details (When NFS export exists., complex, {'anonymous_GID': -2, 'anonymous_UID': -2, 'default_access': 'No_Access', 'default_access_l10n': 'No_Access', 'description': None, 'export_path': '10.xx.xx.xx:/sample_nfs_export', 'file_system': {'filesystem_type': 'Primary', 'id': '61d68815-1ac2-fc68-7263-96e8abdcbab0', 'name': 'sample_file_system', 'nas_server': {'id': '60c0564a-4a6e-04b6-4d5e-fe8be1eb93c9', 'name': 'ansible_nas_server_2'}}, 'id': '61d6888b-52ed-0d4b-2b35-96e8abdcbab0', 'is_no_SUID': False, 'min_security': 'Sys', 'min_security_l10n': 'Sys', 'name': 'sample_nfs_export', 'nfs_owner_username': 0, 'no_access_hosts': [], 'path': '/sample_file_system', 'read_only_hosts': [], 'read_only_root_hosts': [], 'read_write_hosts': [], 'read_write_root_hosts': []}) + The NFS export details. + + + anonymous_GID (, int, ) + The group ID of the anonymous account. + + + anonymous_UID (, int, ) + The user ID of the anonymous account. + + + default_access (, str, ) + Default access level for all hosts that can access the export. + + + description (, str, ) + The description for the NFS export. + + + file_system (, complex, ) + Details of filesystem and NAS server on which NFS export is present. + + + id (, str, ) + The ID of the filesystem. + + + name (, str, ) + The name of the filesystem. + + + filesystem_type (, str, ) + The type of the filesystem. + + + nas_server (, complex, ) + Details of NAS server. + + + id (, str, ) + The ID of the NAS server. + + + name (, str, ) + The name of the NAS server. + + + + + id (, str, ) + The ID of the NFS export. + + + is_no_SUID (, bool, ) + If set, do not allow access to set SUID. Otherwise, allow access. + + + min_security (, str, ) + NFS enforced security type for users accessing an NFS export. + + + name (, str, ) + The name of the NFS export. + + + no_access_hosts (, list, ) + Hosts with no access to the NFS export. + + + path (, str, ) + Local path to a location within the file system. + + + read_only_hosts (, list, ) + Hosts with read-only access to the NFS export. + + + read_only_root_hosts (, list, ) + Hosts with read-only for root user access to the NFS export. + + + read_write_hosts (, list, ) + Hosts with read and write access to the NFS export. + + + read_write_root_hosts (, list, ) + Hosts with read and write for root user access to the NFS export. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) + diff --git a/docs/modules/ntp.rst b/docs/modules/ntp.rst new file mode 100644 index 0000000..ac8d490 --- /dev/null +++ b/docs/modules/ntp.rst @@ -0,0 +1,172 @@ +.. _ntp_module: + + +ntp -- NTP operations on a PowerStore storage system +==================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all NTP operations on a PowerStore Storage System. This module supports get details of an existing NTP instance. You can modify existing NTP instance with supported parameters. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + ntp_id (True, str, None) + Unique identifier of the NTP instance. + + + ntp_addresses (False, list, None) + NTP server addresses, may contain host names or IPv4 addresses. + + + ntp_address_state (False, str, None) + State of the addresses mentioned in ntp_addresses. + + + state (True, str, None) + The state of the NTP instance after the task is performed. + + For get and modify operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Minimum 1 and maximum 3 addresses can be associated to a NTP instance. + - Parameters ntp_addresses and ntp_address_state are required together. + - Creation and deletion of NTP is not supported. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get details of NTP instance + dellemc.powerstore.ntp: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + ntp_id: "NTP1" + state: "present" + + - name: Add addresses to NTP instance + dellemc.powerstore.ntp: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + ntp_id: "NTP1" + ntp_addresses: + - "XX.XX.XX.XX" + - "YY.YY.YY.YY" + ntp_address_state: "present-in-ntp" + state: "present" + + - name: Remove addresses from NTP instance + dellemc.powerstore.ntp: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + ntp_id: "NTP1" + ntp_addresses: + - "YY.YY.YY.YY" + ntp_address_state: "absent-in-ntp" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Shows whether or not the resource has changed. + + +ntp_details (When NTP exists., complex, {'addresses': ['1.2.3.4', '5.6.7.8'], 'id': 'NTP1'}) + Details of the NTP instance. + + + id (, str, ) + Unique identifier of NTP instance. + + + addresses (, str, ) + NTP server addresses, may contain host names or IPv4 addresses. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Bhavneet Sharma (@sharmb5) + diff --git a/docs/modules/protectionpolicy.rst b/docs/modules/protectionpolicy.rst new file mode 100644 index 0000000..af697c1 --- /dev/null +++ b/docs/modules/protectionpolicy.rst @@ -0,0 +1,279 @@ +.. _protectionpolicy_module: + + +protectionpolicy -- Perform Protection policy operations for PowerStore storage system +====================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all protection policy operations on PowerStore Storage System. This module supports create, modify, get and delete a protection policy. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + name (False, str, None) + String variable. Indicates the name of the protection policy. + + + protectionpolicy_id (False, str, None) + String variable. Indicates the id of the protection policy. + + + new_name (optional, str, None) + String variable. Indicates the new name of the protection policy. + + Used for renaming operation. + + + snapshotrules (False, list, None) + List of strings to specify the name or ids of snapshot rules which are to be added or removed, to or from, the protection policy. + + + replicationrule (False, str, None) + The name or ids of the replcation rule which is to be added to the protection policy. + + To remove the replication rule, an empty string has to be passed. + + + description (False, str, None) + String variable. Indicates the description of the protection policy. + + + state (True, str, None) + String variable. Indicates the state of protection policy. + + For Delete operation only, it should be set to "absent". + + For all other operations like Create, Modify or Get details, it should be set to "present". + + + snapshotrule_state (False, str, None) + String variable. Indicates the state of a snapshotrule in a protection policy. + + When snapshot rules are specified, this variable is required. + + Value present-in-policy indicates to add to protection policy. + + Value absent-in-policy indicates to remove from protection policy. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Before deleting a protection policy, the replication rule has to be removed from the protection policy. + - In PowerStore version 3.0.0.0, protection policy without snapshot rule/replication rule is not allowed. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create a protection policy with snapshot rule and replication rule + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + description: "{{description}}" + snapshotrules: + - "Ansible_test_snap_rule_1" + replicationrule: "ansible_replication_rule_1" + snapshotrule_state: "present-in-policy" + state: "present" + + + - name : Modify protection policy, change name + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + new_name: "{{new_name}}" + state: "present" + + + - name : Modify protection policy, add snapshot rule + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + snapshotrules: + - "Ansible_test_snaprule_1" + snapshotrule_state: "present-in-policy" + state: "present" + + - name : Modify protection policy, remove snapshot rule, replication rule + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + snapshotrules: + - "Ansible_test_to_be_removed" + replicationrule: "" + snapshotrule_state: "absent-in-policy" + state: "present" + + - name : Get details of protection policy by name + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + state: "present" + + - name : Get details of protection policy by ID + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + protectionpolicy_id: "{{protectionpolicy_id}}" + state: "present" + + - name : Delete protection policy + dellemc.powerstore.protectionpolicy: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +protectionpolicy_details (When protection policy exists, complex, {'description': None, 'id': 'bce845ea-78ba-4414-ada1-8130f3a49e74', 'name': 'sample_protection_policy', 'replication_rules': [{'id': '7ec83605-bed4-4e2b-8405-504a614db318'}, {'name': 'sample_replication_rule'}], 'snapshot_rules': [], 'type': 'Protection'}) + Details of the protection policy. + + + id (, str, ) + The system generated ID given to the protection policy. + + + name (, str, ) + Name of the protection policy. + + + description (, str, ) + description about the protection policy. + + + type (, str, ) + The type for the protection policy. + + + replication_rules (, complex, ) + The replication rule details of the protection policy. + + + id (, str, ) + The replication rule ID of the protection policy. + + + name (, str, ) + The replication rule name of the protection policy. + + + + snapshot_rules (, complex, ) + The snapshot rules details of the protection policy. + + + id (, str, ) + The snapshot rule ID of the protection policy. + + + name (, str, ) + The snapshot rule name of the protection policy. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/quota.rst b/docs/modules/quota.rst new file mode 100644 index 0000000..343e0df --- /dev/null +++ b/docs/modules/quota.rst @@ -0,0 +1,377 @@ +.. _quota_module: + + +quota -- Manage Tree Quotas and User Quotas on PowerStore +========================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing Quotas on PowerStore storage system includes getting details, modifying, creating and deleting Quotas. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + path (optional, str, None) + The path on which the quota will be imposed. + + Path is relative to the root of the filesystem. + + For user quota, if path is not specified, quota will be created at the root of the filesystem. + + + quota_type (optional, str, None) + The type of quota which will be imposed. + + + quota_id (optional, str, None) + Id of the user/tree quota. + + If quota_id is mentioned, then path/nas_server/file_system/quota_type is not required. + + + filesystem (optional, str, None) + The ID/Name of the filesystem for which the Tree/User Quota will be created. + + If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. + + + nas_server (optional, str, None) + The NAS server. This could be the name or ID of the NAS server. + + + description (optional, str, None) + Additional information that can be mentioned for a Tree Quota. + + Description parameter can only be used when quota_type is 'tree'. + + + unix_name (optional, str, None) + The name of the unix user account for which quota operations will be performed. + + Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. + + + windows_name (optional, str, None) + The name of the Windows User for which quota operations will be performed. + + The name should be mentioned along with Domain Name as 'DOMAIN_NAME\user_name' or as "DOMAIN_NAME\\user_name". + + Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. + + + uid (optional, int, None) + The ID of the unix user account for which quota operations will be performed. + + Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. + + + windows_sid (optional, str, None) + The SID of the Windows User account for which quota operations will be performed. + + Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. + + + quota (optional, dict, None) + Specifies Quota parameters. + + + soft_limit (optional, int, None) + Soft limit of the User/Tree quota. + + No Soft limit when set to 0. + + + hard_limit (optional, int, None) + Hard limit of the user quota. + + No hard limit when set to 0. + + + cap_unit (optional, str, GB) + Unit of storage for the hard and soft limits. + + This parameter is required if limit is specified. + + + + state (True, str, None) + Define whether the Quota should exist or not. + + Value present indicates that the Quota should exist on the system. + + Value absent indicates that the Quota should not exist on the system. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Tree quota cannot be created at the root of the filesystem. + - When the ID of the filesystem is passed then nas_server is not required. If passed, then filesystem should exist for the nas_server, else the task will fail. + - If a primary directory of the current directory or a subordinate directory of the path is having a Tree Quota configured, then the quota for that path cannot be created. + - Hierarchical tree quotas are not allowed. + - When the first quota is created for a directory/user in a filesystem then the quotas will be enabled for that filesystem automatically. + - If a user quota is to be created on a tree quota, then the user quotas will be enabled automatically in a tree quota. + - Delete User Quota operation is not supported. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create a Quota for a User using unix name + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_type: "user" + unix_name: "{{unix_name}}" + filesystem: "sample_fs" + nas_server: "{{nas_server_id}}" + quota: + soft_limit: 5 + hard_limit: 10 + cap_unit: "TB" + state: "present" + + - name: Create a Tree Quota + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_type: "tree" + path: "/home" + filesystem: "sample_fs" + nas_server: "sample_nas_server" + quota: + soft_limit: 5 + hard_limit: 10 + cap_unit: "TB" + state: "present" + + - name: Modify attributes for Tree Quota + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_id: "{{quota_id}}" + quota: + soft_limit: 10 + hard_limit: 15 + cap_unit: "TB" + state: "present" + + - name: Get details of User Quota + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_type: "user" + uid: 100 + path: "/home" + filesystem: "{{filesystem_id}}" + state: "present" + + - name: Get details of Tree Quota + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_id: "{{quota_id}}" + state: "present" + + - name: Delete a Tree Quota + dellemc.powerstore.quota: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + quota_type: "tree" + path: "/home" + filesystem: "sample_fs" + nas_server: "sample_nas_server" + state: "absent" + + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +quota_details (When Quota exists., complex, {'description': 'Tree quota created on filesystem', 'file_system': {'filesystem_type': 'Primary', 'id': '61d68a87-6000-3cc3-f816-96e8abdcbab0', 'name': 'sample_file_system', 'nas_server': {'id': '60c0564a-4a6e-04b6-4d5e-fe8be1eb93c9', 'name': 'ansible_nas_server_2'}}, 'hard_limit(GB)': '90.0', 'id': '00000006-08f2-0000-0200-000000000000', 'is_user_quotas_enforced': False, 'path': '/sample_file_system', 'remaining_grace_period': -1, 'size_used': 0, 'soft_limit(GB)': '50.0', 'state': 'Ok'}) + The quota details. + + + id (, str, 2nQKAAEAAAAAAAAAAAAAQIMCAAAAAAAA) + The ID of the Quota. + + + file_system (, complex, ) + Includes ID and Name of filesystem and nas server for which smb share exists. + + + filesystem_type (, str, Primary) + Type of filesystem. + + + id (, str, 5f73f516-e67b-b179-8901-72114981c1f3) + ID of filesystem. + + + name (, str, sample_filesystem) + Name of filesystem. + + + nas_server (, dict, ) + nas_server of filesystem. + + + + hard_limit(cap_unit) (, int, 4.0) + Value of the Hard Limit imposed on the quota. + + + soft_limit(cap_unit) (, int, 2.0) + Value of the Soft Limit imposed on the quota. + + + remaining_grace_period (, int, 86400) + The time period remaining after which the grace period will expire. + + + description (, str, Sample Tree quota's description) + Additional information about the tree quota. Only applicable for Tree Quotas. + + + uid (, int, ) + The ID of the unix host for which user quota exists. Only applicable for user quotas. + + + unix_name (, str, ) + The Name of the unix host for which user quota exists. Only applicable for user quotas. + + + windows_name (, str, ) + The Name of the Windows host for which user quota exists. Only applicable for user quotas. + + + windows_sid (, str, ) + The SID of the windows host for which user quota exists. Only applicable for user quotas. + + + tree_quota_id (, str, ) + ID of the Tree Quota on which the specific User Quota exists. Only applicable for user quotas. + + + tree_quota_for_user_quota (, complex, ) + Additional Information of Tree Quota limits on which user quota exists. Only applicable for User Quotas. + + + description (, str, Primary) + Description of Tree Quota for user quota. + + + hard_limit(cap_unit) (, int, 2.0) + Value of the Hard Limit imposed on the quota. + + + path (, str, /sample_path) + The path on which the quota will be imposed. + + + + size_used (, int, ) + Size currently consumed by Tree/User on the filesystem. + + + state (, str, Ok) + State of the user quota or tree quota record period. OK means No quota limits are exceeded. Soft_Exceeded means Soft limit is exceeded, and grace period is not expired. Soft_Exceeded_And_Expired means Soft limit is exceeded, and grace period is expired. Hard_Reached means Hard limit is reached. + + + state_l10n (, str, Ok) + Localized message string corresponding to state. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/remote_support.rst b/docs/modules/remote_support.rst new file mode 100644 index 0000000..f11711a --- /dev/null +++ b/docs/modules/remote_support.rst @@ -0,0 +1,346 @@ +.. _remote_support_module: + + +remote_support -- Remote Support operations on a PowerStore storage system +========================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all Remote Support operations on a PowerStore Storage System. This module supports getting details of an existing Remote Support configuration. + +This module also supports modifying an existing Remote Support configuration. Verify a remote support configuration. You can send a test alert through the remote support configuration. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + remote_support_id (True, int, None) + Unique identifier of the remote support configuration. + + + support_type (False, str, None) + The type of remote support that is configured. + + Mandatory for modify and verify operation. + + SRS_Gateway support_type is only supported for verify operation. + + + remote_support_servers (False, list, None) + One or two remote support servers. + + + address (True, str, None) + Gateway server IP address (IPv4). + + The address is a mandatory key. + + + port (optional, int, None) + Gateway server port. + + + is_primary (optional, bool, None) + Indicates whether the server is acting as the primary. + + One server must be set to false when two servers are configured. + + + + server_state (False, str, None) + Indicates the state of the remote-support_servers. + + Required with remote_support_servers. + + + is_support_assist_license_accepted (False, bool, None) + Indicates whether user has accepted remote support license agreement before enabling the Support Assist on the system for the first time. + + + is_cloudiq_enabled (False, bool, None) + Indicates whether support for CloudIQ is enabled. + + + is_rsc_enabled (False, bool, None) + Indicates whether support for Remote Service Credentials is enabled. + + + proxy_address (False, str, None) + Proxy server IP address (IPv4). + + + proxy_port (False, int, None) + Proxy server port number. + + + proxy_username (False, str, None) + User name for proxy server access. + + + proxy_password (False, str, None) + Password for proxy server access. + + + is_icw_configured (False, bool, None) + Client already configured ICW. + + + verify_connection (False, bool, False) + Indicates whether to perform the verify call or not. + + + send_test_alert (False, bool, False) + Indicates whether to send a test alert or not. + + + wait_for_completion (optional, bool, False) + Flag to indicate if the operation should be run synchronously or asynchronously. True signifies synchronous execution. By default, modify operation will run asynchronously. + + + return_support_license_text (False, bool, False) + Indicates whether to return support license agreement text or not. + + + state (True, str, None) + The state of the remote support configuration after the task is performed. + + For Delete operation only, it should be set to "absent". + + For get/modify operation it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Creation and deletion of remote support configuration is not supported. + - Support for check_mode is not available for this module. + - Verify and send test alert operations do not support idempotency. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get details of remote support configuration + dellemc.powerstore.remote_support: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + remote_support_id: 0 + state: "present" + + - name: Modify remote support configuration - SRS_Gateway_Tier2 + dellemc.powerstore.remote_support: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + remote_support_id: 0 + support_type: "SRS_Gateway_Tier2" + remote_support_servers: + - address: "10.XX.XX.XX" + port: 9443 + is_primary: True + - address: "10.XX.XX.YY" + port: 9443 + is_primary: False + server_state: "present-in-server" + is_rsc_enabled: True + is_cloudiq_enabled: False + timeout: 300 + state: "present" + + - name: Modify remote support configuration - SRS_Integrated_Tier2 + dellemc.powerstore.remote_support: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + remote_support_id: 0 + support_type: "SRS_Integrated_Tier2" + proxy_address: "10.XX.XX.ZZ" + proxy_port: 3128 + proxy_username: "user" + proxy_password: "password" + timeout: 300 + state: "present" + + - name: Verify remote support configuration + dellemc.powerstore.remote_support: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + remote_support_id: 0 + support_type: "SRS_Integrated_Tier3" + timeout: 300 + verify_connection: True + state: "present" + + - name: Send a test alert + dellemc.powerstore.remote_support: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + remote_support_id: 0 + send_test_alert: True + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +job_details (When asynchronous task is performed., complex, {'description_l10n': 'Modify SupportAssist configuration.', 'end_time': '2022-02-24T04:41:56.852+00:00', 'estimated_completion_time': None, 'id': '24e3f881-87f1-49f6-8764-13df4906eb2f', 'parent_id': None, 'phase': 'Completed', 'phase_l10n': 'Completed', 'progress_percentage': 100, 'resource_action': 'modify', 'resource_action_l10n': 'modify', 'resource_id': '0', 'resource_name': None, 'resource_type': 'remote_support', 'resource_type_l10n': 'remote support', 'response_body': None, 'response_status': '204', 'response_status_l10n': '204', 'root_id': '24e3f881-87f1-49f6-8764-13df4906eb2f', 'start_time': '2022-02-24T04:41:38.146+00:00', 'state': 'COMPLETED', 'state_l10n': 'Completed', 'step_order': 64871764, 'user': 'admin'}) + The job details. + + + id (, str, ) + The ID of the job. + + + +remote_support_details (When remote support configuration exists., complex, {'connectivity_status': 'Unavailable', 'connectivity_status_l10n': 'Unavailable', 'id': '0', 'is_cloudiq_enabled': True, 'is_rsc_enabled': False, 'is_support_assist_license_accepted': True, 'last_update': '2022-02-11T11:16:39.134+00:00', 'policy_manager_address': None, 'policy_manager_port': None, 'proxy_address': None, 'proxy_port': None, 'proxy_username': None, 'remote_support_servers': [{'address': 'localhost', 'connectivity_qos': [{'appliance_id': 'A1', 'connectivity_qos': 'connectivity_qos', 'connectivity_qos_priority': 2, 'connectivity_qos_value': -1.0, 'id': 'dc326198-2d92-4ff4-a774-324b00ca8818', 'last_update': '2022-02-11T11:16:39.888+00:00', 'remote_support_servers_id': '0'}], 'id': '0', 'is_primary': True, 'port': '9443', 'remote_support_id': '0'}, {'address': 'localhost', 'connectivity_qos': [], 'id': '1', 'is_primary': False, 'port': 'null', 'remote_support_id': '0'}], 'support_assist_license_agreement_text': 'license string', 'type': 'SRS_Integrated_Tier3', 'type_l10n': 'SRS Integrated with Remote Access'}) + Details of the remote support configuration. + + + id (, int, ) + Unique identifier of remote support configuration. + + + type (, str, ) + The type of remote support that is configured. + + + is_cloudiq_enabled (, bool, ) + Indicates whether support for CloudIQ is enabled. + + + is_support_assist_license_accepted (, bool, ) + Indicates whether user has accepted remote support license agreement before enabling the Support Assist on the system for the first time. + + + support_assist_license_agreement_text (, str, ) + The support assist license agreement text. + + + is_rsc_enabled (, bool, ) + Indicates whether support for Remote Service Credentials is enabled. + + + proxy_address (, str, ) + Proxy server IP address (IPv4). + + + proxy_port (, int, ) + Proxy server port number. + + + proxy_username (, str, ) + User name for proxy server access. + + + proxy_password (, str, ) + Password for proxy server access. + + + remote_support_servers (, complex, ) + Details of two remote support servers. + + + id (, str, ) + Unique identifier of the remote support server. + + + address (, str, ) + Gateway server IP address (IPv4). + + + port (, int, ) + Gateway server port. + + + is_primary (, bool, ) + Indicates whether the server is acting as the primary. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/remote_support_contact.rst b/docs/modules/remote_support_contact.rst new file mode 100644 index 0000000..ee7b3fb --- /dev/null +++ b/docs/modules/remote_support_contact.rst @@ -0,0 +1,182 @@ +.. _remote_support_contact_module: + + +remote_support_contact -- Remote Support Contact operations on a PowerStore storage system +========================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all Remote Support Contact operations on a PowerStore Storage system. This module supports get details and you can modify a Remote Support Contact with supported parameters. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + contact_id (True, int, None) + Unique identifier of the remote support contact. + + + first_name (False, str, None) + The first name of the support contact for this system. + + + last_name (False, str, None) + The last name of the support contact for this system. + + + phone (False, str, None) + The phone number of this support contact for this system. + + + email (False, str, None) + The email address of the support contact for this system. + + + state (True, str, None) + The state of the remote support contact after the task is performed. + + For Delete operation only, it should be set to "absent". + + For get/modify operation it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Creation and deletion of remote support contact is not supported. + - Parameters first_name, last_name, email and phone can be removed by passing empty string. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get details of remote support contact + dellemc.powerstore.remote_support_contact: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + contact_id: 0 + state: "present" + + - name: Modify remote support contact + dellemc.powerstore.remote_support_contact: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + contact_id: 0 + first_name: "abc" + last_name: "xyz" + phone: "111-222-333-444" + email: "abc_xyz@dell.com" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +remote_support_contact_details (When remote support contact exists., complex, {'email': '', 'first_name': 'sample', 'id': '0', 'last_name': 'contact', 'phone': '0123213423'}) + Details of the remote support contact. + + + id (, int, ) + Unique identifier of remote support contact. + + + first_name (, str, ) + The first name of the support contact for this system. + + + last_name (, str, ) + The last name of the support contact for this system. + + + phone (, str, ) + The phone number of this support contact for this system. + + + email (, str, ) + The email address of the support contact for this system. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/remotesystem.rst b/docs/modules/remotesystem.rst new file mode 100644 index 0000000..0be7376 --- /dev/null +++ b/docs/modules/remotesystem.rst @@ -0,0 +1,327 @@ +.. _remotesystem_module: + + +remotesystem -- Remote system operations on a PowerStore storage system +======================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all remote system operations on a PowerStore Storage System. + +This module supports get details of a remote systems, create/Add new remote system for all supported parameters, modify remote system with supported parameters and delete/remove a remote system. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + remote_name (False, str, None) + Name of the remote system. + + Parameter remote_name cannot be mentioned during addition of a new remote system. + + + remote_id (False, str, None) + ID of the remote system. + + ID for the remote system is autogenerated, cannot be passed during creation of a remote system. + + Parameter remote_id and remote_address are mutually exclusive. + + + remote_user (False, str, None) + Username used in basic authentication to remote PowerStore cluster. + + It can be mentioned only during creation of the remote system. + + + remote_password (False, str, None) + Password used in basic authentication to remote PowerStore cluster. + + It can be mentioned only during creation of the remote system. + + + remote_address (False, str, None) + Management IP of the remote system. + + Parameter remote_id and remote_address are mutually exclusive. + + + new_remote_address (False, str, None) + New management IP of the remote system. + + + remote_port (False, int, 443) + Remote system's port number. + + It can be mentioned only during creation of the remote system. + + + description (False, str, None) + Additional information about the remote system. + + To remove the description empty string is to be passed. + + + network_latency (False, str, None) + Replication traffic can be tuned for higher efficiency depending on the expected network latency. + + Setting to low will have latency of less than five milliseconds. + + Setting to high will have latency of more than five milliseconds. + + + wait_for_completion (False, bool, False) + Flag to indicate if the operation should be run synchronously or asynchronously. + + True signifies synchronous execution. + + By default, modify and delete operation will run asynchronously. + + + state (True, str, None) + The state of the remote system after the task is performed. + + For Delete operation only, it should be set to "absent". + + For all Create, Modify or Get details operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The module support allows create/delete/update only for remote PowerStore arrays. + - Get details can be done for all type of remote arrays. + - Parameters remote_user, remote_port and remote_password are not required during modification, getting and deleting. If passed then these parameters will be ignored and the operation will be performed. + - If wait_for_completion is set to True then the connection will be terminated after the timeout is exceeded. User can tweak timeout and pass it in the playbook task. + - By default, the timeout is set to 120 seconds. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Add a new remote system + dellemc.powerstore.remotesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + remote_address: "xxx.xxx.xxx.xxx" + remote_user: "admin" + remote_password: "{{remote_password}}" + remote_port: 443 + network_latency: "Low" + decription: "Adding a new remote system" + state: "present" + + - name: Modify attributes of remote system using remote_id + dellemc.powerstore.remotesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + remote_id: "7d7e7917-735b-3eef-8cc3-1302001c08e7" + remote_address: "xxx.xxx.xxx.xxx" + network_latency: "Low" + wait_for_completion: True + timeout: 300 + decription: "Updating the description" + state: "present" + + - name: Get details of remote system using remote_id + dellemc.powerstore.remotesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + remote_id: "D7d7e7917-735b-3eef-8cc3-1302001c08e7" + state: "present" + + - name: Delete remote system using remote_id + dellemc.powerstore.remotesystem: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + remote_id: "D7d7e7917-735b-3eef-8cc3-1302001c08e7" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +job_details (When wait_for_completion is not set to True., complex, {'description_l10n': 'Modify network parameters.', 'end_time': '2022-01-06T07:39:05.846+00:00', 'estimated_completion_time': None, 'id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'parent_id': None, 'phase': 'Completed', 'phase_l10n': 'Completed', 'progress_percentage': 100, 'resource_action': 'modify', 'resource_action_l10n': 'modify', 'resource_id': 'nw6', 'resource_name': None, 'resource_type': 'network', 'resource_type_l10n': 'network', 'response_body': None, 'response_status': None, 'response_status_l10n': None, 'root_id': 'be0d099c-a6cf-44e8-88d7-9be80ccae369', 'start_time': '2022-01-06T07:39:05.47+00:00', 'state': 'COMPLETED', 'state_l10n': 'Completed', 'step_order': 23792565, 'user': 'admin'}) + Details of the job. + + + id (, str, ) + The id of the job. + + + +remote_system_details (When remote system exists, complex, {'data_connection_state': 'Initializing', 'data_connection_state_l10n': 'Initializing', 'data_connections': None, 'data_network_latency': 'Low', 'data_network_latency_l10n': 'Low', 'description': 'Adding remote system', 'discovery_chap_mode': 'Disabled', 'discovery_chap_mode_l10n': 'Disabled', 'id': 'aaa3cc6b-455b-4bde-aa75-a1edf61bbe0b', 'import_sessions': [], 'iscsi_addresses': ['xx.xx.xx.xx', 'xx.xx.xx.xx'], 'management_address': 'xx.xx.xx.xx', 'name': 'RT-D0100', 'replication_sessions': [], 'serial_number': 'PSeba1a5c63d46', 'session_chap_mode': 'Disabled', 'session_chap_mode_l10n': 'Disabled', 'state': 'Ok', 'state_l10n': 'Ok', 'type': 'PowerStore', 'type_l10n': 'PowerStore', 'user_name': ''}) + Details of the remote system. + + + id (, str, ) + The system generated ID of the remote system. + + + name (, str, ) + Name of the remote system. + + + management_address (, str, ) + The management cluster IP address of the remote system. + + + description (, str, ) + User-specified description of the remote system instance. + + + serial_number (, str, ) + Serial number of the remote system instance. + + + version (, str, ) + Version of the remote system. + + It was added in PowerStore version 2.0.0.0. + + + type (, str, ) + Remote system connection type between the local system. + + + user_name (, str, ) + Username used to access the non-PowerStore remote systems. + + + state (, str, ) + Possible remote system states. + + OK, Normal conditions. + + Update_Needed, Verify and update needed to handle network configuration changes on the systems. + + Management_Connection_Lost, Management connection to the remote peer is lost. + + + data_connection_state (, str, ) + Data connection states of a remote system. + + + discovery_chap_mode (, str, ) + Challenge Handshake Authentication Protocol (CHAP) statu. + + + session_chap_mode (, str, ) + Challenge Handshake Authentication Protocol (CHAP) status. + + + data_network_latency (, str, ) + Network latency choices for a remote system. Replication traffic can be tuned for higher efficiency depending on the expected network latency. + + This will only be used when the remote system type is PowerStore. + + + data_connections (, complex, ) + List of data connections from each appliance in the local cluster to iSCSI target IP address. + + + node_id (, str, ) + Unique identifier of the local, initiating node. + + + initiator_address (, str, ) + Initiating address from the local node. + + + status (, str, ) + Possible transit connection statuses. + + + target_address (, str, ) + Target address from the remote system. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/replicationrule.rst b/docs/modules/replicationrule.rst new file mode 100644 index 0000000..dd8f802 --- /dev/null +++ b/docs/modules/replicationrule.rst @@ -0,0 +1,233 @@ +.. _replicationrule_module: + + +replicationrule -- Replication rule operations on a PowerStore storage system +============================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all replication rule operations on a PowerStore Storage System. + +This module supports get details of an existing replication rule, create new replication rule for supported parameters, modify replication rule and delete a specific replication rule. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + replication_rule_name (False, str, None) + Name of the replication rule. + + Required during creation of a replication rule. + + Parameter replication_rule_name and replication_rule_id are mutually exclusive. + + + replication_rule_id (False, str, None) + ID of the replication rule. + + ID for the rule is autogenerated, cannot be passed during creation of a replication rule. + + Parameter replication_rule_name and replication_rule_id are mutually exclusive. + + + new_name (False, str, None) + New name of the replication rule. + + Used for renaming a replication rule. + + + rpo (False, str, None) + Recovery point objective (RPO), which is the acceptable amount of data, measured in units of time, that may be lost in case of a failure. + + + alert_threshold (False, int, None) + Acceptable delay between the expected and actual replication sync intervals. The system generates an alert if the delay between the expected and actual sync exceeds this threshold. + + During creation, if not passed, then by default one RPO in minutes will be passed. + + The range of integers supported are in between 0 and 1440 (inclusive of both). + + + remote_system (False, str, None) + ID or name of the remote system to which this rule will replicate the associated resources. + + + remote_system_address (False, str, None) + The management IPv4 address of the remote system. + + It is required in case the remote system name passed in remote_system parameter is not unique on the PowerStore Array. + + If ID of the remote system is passed then no need to pass remote_system_address. + + + state (True, str, None) + The state of the replication rule after the task is performed. + + For Delete operation only, it should be set to "absent". + + For all Create, Modify or Get details operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create new replication rule + dellemc.powerstore.replicationrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + replication_rule_name: "sample_replication_rule" + rpo: "Five_Minutes" + alert_threshold: "15" + remote_system: "WN-D8877" + state: "present" + + - name: Modify existing replication rule + dellemc.powerstore.replicationrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + replication_rule_name: "sample_replication_rule" + new_name: "new_sample_replication_rule" + rpo: "One_Hour" + alert_threshold: "60" + remote_system: "WN-D0517" + state: "present" + + - name: Get details of replication rule + dellemc.powerstore.replicationrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + replication_rule_id: "{{id}}" + state: "present" + + - name: Delete an existing replication rule + dellemc.powerstore.replicationrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + replication_rule_name: "new_sample_replication_rule" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +replication_rule_details (When replication rule exists, complex, {'alert_threshold': 15, 'id': '0a9dc368-3085-4f4b-b7a4-23ec0166542f', 'is_replica': False, 'name': 'sample_replication_rule', 'policies': [], 'remote_system_id': '677f64ff-955a-49ce-9a06-7d5af0ec4929', 'remote_system_name': 'RT-D0101', 'rpo': 'Thirty_Minutes'}) + Details of the replication rule. + + + id (, str, ) + The system generated ID of the replication rule. + + + name (, str, ) + Name of the replication rule. + + + alert_threshold (, int, ) + Acceptable delay in minutes between the expected and actual replication sync intervals. + + + rpo (, str, ) + Recovery point objective (RPO), which is the acceptable amount of data, measured in units of time, that may be lost in case of a failure. + + + remote_system_id (, str, ) + Unique identifier of the remote system to which this rule will replicate the associated resources. + + + remote_system_name (, str, ) + Name of the remote system to which this rule will replicate the associated resources. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/replicationsession.rst b/docs/modules/replicationsession.rst new file mode 100644 index 0000000..13f85ca --- /dev/null +++ b/docs/modules/replicationsession.rst @@ -0,0 +1,236 @@ +.. _replicationsession_module: + + +replicationsession -- Replication session operations on a PowerStore storage system +=================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all replication session state change operations on a PowerStore Storage System. + +This module supports get details of an existing replication session. Updating the state of the replication session. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + filesystem (False, str, None) + Name/ID of the filesystem for which replication session exists. + + Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive. + + + nas_server (False, str, None) + Name/ID of the NAS server for which replication session exists. + + Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive. + + + volume_group (False, str, None) + Name/ID of the volume group for which a replication session exists. + + Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive. + + + volume (False, str, None) + Name/ID of the volume for which replication session exists. + + Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive. + + + session_id (False, str, None) + ID of the replication session. + + Parameter filesystem, nas_server, volume_group, volume, and session_id are mutually exclusive. + + + session_state (False, str, None) + State in which the replication session is present after performing the task. + + + role (False, str, None) + Role of the metro replication session. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Manual synchronization for a replication session is not supported through the Ansible module. + - When the current state of the replication session is 'OK' and in the playbook task 'synchronizing', then it will return "changed" as False. + - The changed as False in above scenario is because of there is a scheduled synchronization in place with the associated replication rule's RPO in the protection policy. + - The check_mode is not supported. + - Parameter nas_server, filesystem, and role parameters are supported only for PowerStore version 3.0.0. and above. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Pause a replication session + dellemc.powerstore.replicationsession: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + volume: "sample_volume_1" + session_state: "paused" + + - name: Modify a replication session + dellemc.powerstore.replicationsession: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + volume: "sample_volume_1" + role: "Metro_Preferred" + + - name: Get details of a replication session + dellemc.powerstore.replicationsession: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + volume: "sample_volume_1" + + - name: Fail over a replication session + dellemc.powerstore.replicationsession: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + volume: "sample_volume_1" + session_state: "failed_over" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +replication_session_details (When replication session exists, complex, {'estimated_completion_timestamp': None, 'id': 'b05b5108-26b6-4567-a1d8-1c7795b2e6bc', 'last_sync_timestamp': '2022-01-06T06:55:01.870946+00:00', 'local_resource_id': 'b0acb8de-446b-48e4-82ae-89ed05a35d01', 'local_resource_name': 'sample_volume', 'migration_session': None, 'progress_percentage': None, 'remote_resource_id': 'c1535ab7-e874-42eb-8692-7aa12aa4346e', 'remote_system': {'id': 'b5f62edd-f7aa-483a-afaa-4364ab6fcd3a', 'name': 'WN-D8989'}, 'remote_system_id': 'b5f62edd-f7aa-483a-afaa-4364ab6fcd3a', 'replication_rule': {'id': '05777d33-b2fb-4e65-8202-208ff4fe5878', 'name': 'sample_replication_rule'}, 'replication_rule_id': '05777d33-b2fb-4e65-8202-208ff4fe5878', 'resource_type': 'Volume', 'resource_type_l10n': 'Volume', 'role': 'Destination', 'role_l10n': 'Destination', 'state': 'Paused', 'state_l10n': 'Paused', 'storage_element_pairs': [{'local_storage_element_id': 'b0acb8de-446b-48e4-82ae-89ed05a35d01', 'remote_storage_element_id': 'c1535ab7-e874-42eb-8692-7aa12aa4346e', 'replication_shadow_id': None, 'storage_element_type': 'volume'}]}) + Details of the replication session. + + + id (, str, ) + The system generated ID of the replication session. Unique across source and destination roles. + + + name (, str, ) + Name of the replication rule. + + + role (, str, ) + Role of the replication session. Source - The local resource is the source of the remote replication session. Destination - The local resource is the destination of the remote replication session. + + + resource_type (, str, ) + Storage resource type eligible for replication protection. volume - Replication session created on a volume. volume_group - Replication session created on a volume group. + + + local_resource_id (, str, ) + Unique identifier of the local storage resource for the replication session. + + + remote_resource_id (, str, ) + Unique identifier of the remote storage resource for the replication session. + + + remote_system_id (, str, ) + Unique identifier of the remote system instance. + + + progress_percentage (, int, ) + Progress of the current replication operation. + + + replication_rule_id (, str, ) + Associated replication rule instance if created by policy engine. + + + state (, str, ) + State of the replication session. + + + last_sync_timestamp (, str, ) + Time of last successful synchronization. + + + estimated_completion_timestamp (, str, ) + Estimated completion time of the current replication operation. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/role.rst b/docs/modules/role.rst new file mode 100644 index 0000000..b9395ba --- /dev/null +++ b/docs/modules/role.rst @@ -0,0 +1,162 @@ +.. _role_module: + + +role -- Get details of the roles present on the PowerStore storage system +========================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Manage role in PowerStore storage system includes getting the details of a role. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + role_name (optional, str, None) + Name of the role. + + + role_id (optional, str, None) + Id of the role. + + + state (True, str, None) + Define whether the role should exist or not. + + Value present, indicates that the role should exist on the system. + + Value absent, indicates that the role should not exist on the system. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Only getting the details of the role is supported by the ansible module. + - Creation, modification and deletion of roles is not supported by the ansible modules. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get the details of role by name + dellemc.powerstore.role: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + role_name: "Administrator" + state: "present" + + - name: Get the details of role by id + dellemc.powerstore.role: + array_ip: "{{array_ip}}" + verifycert: "{{verify_cert}}" + user: "{{user}}" + password: "{{password}}" + role_id: "1" + state: "present" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +role_details (When role exists., complex, {'description': 'Can view status and performance information', 'id': '1', 'is_built_in': True, 'name': 'Administrator'}) + The role details. + + + id (, str, ) + The ID of the role. + + + name (, str, ) + The name of the role. + + + is_built_in (, bool, ) + Indicates whether the role is built-in. + + + description (, str, ) + Description of the role. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/security_config.rst b/docs/modules/security_config.rst new file mode 100644 index 0000000..1157c3f --- /dev/null +++ b/docs/modules/security_config.rst @@ -0,0 +1,158 @@ +.. _security_config_module: + + +security_config -- Security configuration operations for PowerStore Storage System +================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing security configuration on PowerStore storage system includes getting details and modifying security configuration parameters. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + security_config_id (True, int, None) + ID of the security configuration. + + Mandatory for all operations. + + + protocol_mode (optional, str, None) + Protocol mode of the security configuration. + + Mandatory only for modify operation. + + + state (True, str, None) + Define whether the security config should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Creation and deletion of security configs is not supported by Ansible modules. + - Modification of protocol mode is only supported for PowerStore v2.0.0.0 and above. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get security config + dellemc.powerstore.security_config: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + security_config_id: 1 + state: "present" + + - name: Modify attribute of security config + dellemc.powerstore.security_config: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + security_config_id: 1 + protocol_mode: "TLSv1_1" + state: "present" + + + +Return Values +------------- + +changed (always, bool, true) + Whether or not the resource has changed. + + +security_config_details (When security config exists, complex, {'id': '1', 'idle_timeout': 3600, 'protocol_mode': 'TLSv1_2', 'protocol_mode_l10n': 'TLSv1_2'}) + Details of the security configuration. + + + id (, str, ) + The system generated ID given to the security configuration. + + + idle_timeout (, int, ) + Idle time (in seconds) after which login sessions will expire and require re-authentication. + + + protocol_mode (, str, ) + The protocol mode of the security configuration. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Bhavneet Sharma (@sharmb5) + diff --git a/docs/modules/smbshare.rst b/docs/modules/smbshare.rst new file mode 100644 index 0000000..4981699 --- /dev/null +++ b/docs/modules/smbshare.rst @@ -0,0 +1,360 @@ +.. _smbshare_module: + + +smbshare -- Manage SMB shares on a PowerStore storage system +============================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing SMB Shares on PowerStore storage system includes create, get, modify, and delete the SMB shares. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + share_name (optional, str, None) + Name of the SMB share. + + Required during creation of the SMB share. + + For all other operations either share_name or share_id is required. + + + share_id (optional, str, None) + ID of the SMB share. + + Should not be specified during creation. ID is auto generated. + + For all other operations either share_name or share_id is required. + + If share_id is used then no need to pass nas_server/filesystem/snapshot/ path. + + + path (optional, str, None) + Local path to the file system/Snapshot or any existing sub-folder of the file system/Snapshot that is shared over the network. + + Path is relative to the base of the NAS server and must start with the name of the filesystem. + + Required for creation of the SMB share. + + + filesystem (optional, str, None) + The ID/Name of the File System. + + Either filesystem or snapshot is required for creation of the SMB share. + + If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. + + If filesystem parameter is provided, then snapshot cannot be specified. + + + snapshot (optional, str, None) + The ID/Name of the Snapshot. + + Either filesystem or snapshot is required for creation of the SMB share. + + If snapshot name is specified, then nas_server is required to uniquely identify the snapshot. + + If snapshot parameter is provided, then filesystem cannot be specified. + + SMB share can be created only if access type of snapshot is "protocol". + + + nas_server (optional, str, None) + The ID/Name of the NAS Server. + + It is not required if share_id is used. + + + description (optional, str, None) + Description for the SMB share. + + Optional parameter when creating a share. + + To modify, pass the new value in description field. + + + is_abe_enabled (optional, bool, None) + Indicates whether Access-based Enumeration (ABE) for SMB share is enabled. + + During creation, if not mentioned, then the default is False. + + + is_branch_cache_enabled (optional, bool, None) + Indicates whether Branch Cache optimization for SMB share is enabled. + + During creation, if not mentioned then default is False. + + + is_continuous_availability_enabled (optional, bool, None) + Indicates whether continuous availability for SMB 3.0 is enabled. + + During creation, if not mentioned, then the default is False. + + + is_encryption_enabled (optional, bool, None) + Indicates whether encryption for SMB 3.0 is enabled at the shared folder level. + + During creation, if not mentioned then default is False. + + + offline_availability (optional, str, None) + Defines valid states of Offline Availability. + + MANUAL- Only specified files will be available offline. + + DOCUMENTS- All files that users open will be available offline. + + PROGRAMS- Program will preferably run from the offline cache even when connected to the network. All files that users open will be available offline. + + NONE- Prevents clients from storing documents and programs in offline cache. + + + umask (optional, str, None) + The default UNIX umask for new files created on the SMB Share. + + During creation, if not mentioned, then the default is "022". + + For all other operations, the default is None. + + + state (True, str, None) + Define whether the SMB share should exist or not. + + Value present indicates that the share should exist on the system. + + Value absent indicates that the share should not exist on the system. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - When the ID of the filesystem/snapshot is passed then nas_server is not required. If passed, then the filesystem/snapshot should exist for the nas_server, else the task will fail. + - Multiple SMB shares can be created for the same local path. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create SMB share for a filesystem + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_name: "sample_smb_share" + filesystem: "sample_fs" + nas_server: "{{nas_server_id}}" + path: "{{path}}" + description: "Sample SMB share created" + is_abe_enabled: True + is_branch_cache_enabled: True + offline_availability: "DOCUMENTS" + is_continuous_availability_enabled: True + is_encryption_enabled: True + state: "present" + + - name: Modify Attributes of SMB share for a filesystem + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_name: "sample_smb_share" + nas_server: "sample_nas_server" + description: "Sample SMB share attributes updated" + is_abe_enabled: False + is_branch_cache_enabled: False + offline_availability: "MANUAL" + is_continuous_availability_enabled: False + is_encryption_enabled: False + umask: "022" + state: "present" + + - name: Create SMB share for a snapshot + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_name: "sample_snap_smb_share" + snapshot: "sample_snapshot" + nas_server: "{{nas_server_id}}" + path: "{{path}}" + description: "Sample SMB share created for snapshot" + is_abe_enabled: True + is_branch_cache_enabled: True + is_continuous_availability_enabled: True + state: "present" + + - name: Modify Attributes of SMB share for a snapshot + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_name: "sample_snap_smb_share" + nas_server: "sample_nas_server" + description: "Sample SMB share attributes updated for snapshot" + is_abe_enabled: False + is_branch_cache_enabled: False + offline_availability: "MANUAL" + is_continuous_availability_enabled: False + umask: "022" + state: "present" + + - name: Get details of SMB share + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_id: "{{smb_share_id}}" + state: "present" + + - name: Delete SMB share + dellemc.powerstore.smbshare: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + share_id: "{{smb_share_id}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +smb_share_details (When share exists., complex, {'description': 'SMB Share created', 'file_system': {'filesystem_type': 'Primary', 'id': '61d68c36-7c59-f5d9-65f0-96e8abdcbab0', 'name': 'sample_file_system', 'nas_server': {'id': '60c0564a-4a6e-04b6-4d5e-fe8be1eb93c9', 'name': 'ansible_nas_server'}}, 'id': '61d68cf6-34d3-7b16-0370-96e8abdcbab0', 'is_ABE_enabled': True, 'is_branch_cache_enabled': True, 'is_continuous_availability_enabled': True, 'is_encryption_enabled': True, 'name': 'sample_smb_share', 'offline_availability': 'Documents', 'path': '/sample_file_system', 'umask': '177'}) + The SMB share details. + + + id (, str, 5efc4432-cd57-5dd0-2018-42079d64ae37) + The ID of the SMB share. + + + name (, str, sample_smb_share) + Name of the SMB share. + + + file_system (, complex, ) + Includes ID and Name of filesystem and nas server for which smb share exists. + + + filesystem_type (, str, Primary) + Type of filesystem. + + + id (, str, 5f73f516-e67b-b179-8901-72114981c1f3) + ID of filesystem. + + + name (, str, sample_filesystem) + Name of filesystem. + + + nas_server (, dict, ) + nas_server of filesystem. + + + + description (, str, This share is created for demo purpose only.) + Additional information about the share. + + + is_ABE_enabled (, bool, False) + Whether Access Based enumeration is enforced or not + + + is_branch_cache_enabled (, bool, False) + Whether branch cache is enabled or not. + + + is_continuous_availability_enabled (, bool, False) + Whether the share will be available continuously or not. + + + is_encryption_enabled (, bool, False) + Whether encryption is enabled or not. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) + diff --git a/docs/modules/smtp_config.rst b/docs/modules/smtp_config.rst new file mode 100644 index 0000000..d0a42f0 --- /dev/null +++ b/docs/modules/smtp_config.rst @@ -0,0 +1,188 @@ +.. _smtp_config_module: + + +smtp_config -- SMTP configuration operations on a PowerStore storage system +=========================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all SMTP configuration operations on a PowerStore Storage System. + +This module supports get details of an existing SMTP configuration. You can modify an existing SMTP configuration with supported parameters. You can also send a test mail through configured SMTP server. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + smtp_id (True, int, None) + Unique identifier of the SMTP configuration. + + + smtp_address (False, str, None) + IP address of the SMTP server. + + + smtp_port (False, int, None) + Port used for sending SMTP messages. + + + source_email (False, str, None) + Source email address used for sending SMTP messages. + + + destination_email (False, str, None) + Destination email address for the test. + + + state (True, str, None) + The state of the SMTP configuration after the task is performed. + + For Delete operation only, it should be set to "absent". + + For all operations it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Idempotency is not supported for test operation for smtp_config module. + - Creation and deletion of SMTP configuration is not supported. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get details of SMTP configuration + dellemc.powerstore.smtp_config: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + smtp_id: "0" + state: "present" + + - name: Modify SMTP config details + dellemc.powerstore.smtp_config: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + smtp_id: "0" + smtp_address: "sample.smtp.com" + source_email: "def@dell.com" + state: "present" + + - name: Send a test mail through the SMTP server + dellemc.powerstore.smtp_config: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + smtp_id: "0" + destination_email: "abc@dell.com" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +smtp_config_details (When SMTP configuration exists., complex, {'address': 'sample.com', 'id': '0', 'port': 25, 'source_email': 'sample_source@dell.com'}) + Details of the SMTP configuration. + + + id (, int, ) + Unique identifier of SMTP configuration. + + + address (, str, ) + IP address of the SMTP server. + + + port (, int, ) + Port used for sending SMTP messages. + + + source_email (, str, ) + Source email address used for sending SMTP messages. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trisha Datta (@Trisha_Datta) + diff --git a/docs/modules/snapshot.rst b/docs/modules/snapshot.rst new file mode 100644 index 0000000..d3f7343 --- /dev/null +++ b/docs/modules/snapshot.rst @@ -0,0 +1,339 @@ +.. _snapshot_module: + + +snapshot -- Manage Snapshots for PowerStore +=========================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing Snapshots on PowerStore storage system, Create a new Volume Group Snapshot, Get details of Volume Group Snapshot, Modify Volume Group Snapshot, Delete an existing Volume Group Snapshot. + +Module also supports Create a new Volume Snapshot, Get details of Volume Snapshot, Modify Volume Snapshot, Delete an existing Volume Snapshot. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + snapshot_name (optional, str, None) + The name of the Snapshot. Either snapshot name or ID is required. + + + snapshot_id (optional, str, None) + The ID of the Snapshot. Either snapshot ID or Snapshot name is required. + + + volume (optional, str, None) + The volume. This could be the volume name or ID. + + + volume_group (optional, str, None) + The volume group. This could be the volume group name or ID. + + + new_snapshot_name (optional, str, None) + The new name of the Snapshot. + + + desired_retention (optional, str, None) + The retention value for the Snapshot. + + If the retention value is not specified, the Snapshot details would be returned. + + To create a Snapshot, either a retention or expiration timestamp must be given. + + If the Snapshot does not have any retention value - specify it as 'None'. + + + retention_unit (optional, str, None) + The unit for retention. + + If this unit is not specified, 'hours' is taken as default retention_unit. + + If desired_retention is specified, expiration_timestamp cannot be specified. + + + expiration_timestamp (optional, str, None) + The expiration timestamp of the Snapshot. This should be provided in UTC format, e.g 2019-07-24T10:54:54Z. + + + description (optional, str, None) + The description for the Snapshot. + + + state (True, str, None) + Defines whether the Snapshot should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create a volume snapshot on PowerStore + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + volume: "{{volume}}" + description: "{{description}}" + desired_retention: "{{desired_retention}}" + retention_unit: "{{retention_unit_days}}" + state: "{{state_present}}" + + - name: Get details of a volume snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + volume: "{{volume}}" + state: "{{state_present}}" + + - name: Rename volume snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + new_snapshot_name: "{{new_snapshot_name}}" + volume: "{{volume}}" + state: "{{state_present}}" + + - name: Delete volume snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{new_snapshot_name}}" + volume: "{{volume}}" + state: "{{state_absent}}" + + - name: Create a volume group snapshot on PowerStore + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + volume_group: "{{volume_group}}" + description: "{{description}}" + expiration_timestamp: "{{expiration_timestamp}}" + state: "{{state_present}}" + + - name: Get details of a volume group snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + volume_group: "{{volume_group}}" + state: "{{state_present}}" + + - name: Modify volume group snapshot expiration timestamp + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + volume_group: "{{volume_group}}" + description: "{{description}}" + expiration_timestamp: "{{expiration_timestamp_new}}" + state: "{{state_present}}" + + - name: Rename volume group snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{snapshot_name}}" + new_snapshot_name: "{{new_snapshot_name}}" + volume_group: "{{volume_group}}" + state: "{{state_present}}" + + - name: Delete volume group snapshot + dellemc.powerstore.snapshot: + array_ip: "{{mgmt_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshot_name: "{{new_snapshot_name}}" + volume_group: "{{volume_group}}" + state: "{{state_absent}}" + + + +Return Values +------------- + +changed (always, bool, true) + Whether or not the resource has changed. + + +create_vg_snap (When value exists, bool, true) + A boolean flag to indicate whether volume group snapshot got created. + + +create_vol_snap (When value exists, bool, true) + A boolean flag to indicate whether volume snapshot got created. + + +delete_vg_snap (When value exists, bool, true) + A boolean flag to indicate whether volume group snapshot got deleted. + + +delete_vol_snap (When value exists, bool, true) + A boolean flag to indicate whether volume snapshot got deleted. + + +modify_vg_snap (When value exists, bool, true) + A boolean flag to indicate whether volume group snapshot got modified. + + +modify_vol_snap (When value exists, bool, true) + A boolean flag to indicate whether volume snapshot got modified. + + +snap_details (When snapshot exists, complex, {'appliance_id': 'A1', 'creation_timestamp': '2022-01-06T05:41:59.381459+00:00', 'description': 'Snapshot created', 'hlu_details': [], 'host': [], 'host_group': [], 'id': '634e4b95-e7bd-49e7-957b-6dc932642464', 'is_replication_destination': False, 'location_history': None, 'mapped_volumes': [], 'migration_session_id': None, 'name': 'sample_snapshot', 'nguid': None, 'node_affinity': 'System_Select_At_Attach', 'node_affinity_l10n': 'System Select At Attach', 'nsid': None, 'performance_policy': {'id': 'default_medium', 'name': 'Medium'}, 'performance_policy_id': 'default_medium', 'protection_data': {'copy_signature': 'b9978b85-4a73-4abb-a25a-634e36f3e3d1', 'created_by_rule_id': None, 'created_by_rule_name': None, 'creator_type': 'User', 'creator_type_l10n': 'User', 'expiration_timestamp': '2022-01-06T08:41:00+00:00', 'family_id': 'dc15650a-2af5-4398-8ae3-63fc7ae25f63', 'is_app_consistent': False, 'parent_id': 'dc15650a-2af5-4398-8ae3-63fc7ae25f63', 'source_id': 'dc15650a-2af5-4398-8ae3-63fc7ae25f63', 'source_timestamp': '2022-01-06T05:41:59.381459+00:00'}, 'protection_policy': None, 'protection_policy_id': None, 'size': 1073741824, 'state': 'Ready', 'state_l10n': 'Ready', 'type': 'Snapshot', 'type_l10n': 'Snapshot', 'volume_groups': [], 'wwn': None}) + Details of the snapshot. + + + id (, str, ) + The system generated ID given to the snapshot. + + + name (, str, ) + Name of the snapshot. + + + size (, int, ) + Size of the snapshot. + + + description (, str, ) + Description about the snapshot. + + + creation_timestamp (, str, ) + The creation timestamp of the snapshot. + + + performance_policy_id (, str, ) + The performance policy for the snapshot. + + + protection_policy_id (, str, ) + The protection policy of the snapshot. + + + state (, str, ) + The state of the snapshot. + + + type (, str, ) + The type of the snapshot. + + + protection_data (, complex, ) + The protection data of the snapshot. + + + expiration_timestamp (, str, ) + The expiration timestamp of the snapshot. + + + + volumes (, complex, ) + The volumes details of the volume group snapshot. + + + id (, str, ) + The system generated ID given to the volume associated with the volume group. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajshree Khare (@khareRajshree) +- Prashant Rakheja (@prashant-dell) + diff --git a/docs/modules/snapshotrule.rst b/docs/modules/snapshotrule.rst new file mode 100644 index 0000000..c0d3f8b --- /dev/null +++ b/docs/modules/snapshotrule.rst @@ -0,0 +1,284 @@ +.. _snapshotrule_module: + + +snapshotrule -- Snapshot Rule operations on a PowerStore storage system +======================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Performs all snapshot rule operations on PowerStore Storage System. + +This modules supports get details of a snapshot rule, create new Snapshot Rule with Interval, create new Snapshot Rule with specific time and days_of_week. Modify Snapshot Rule. Delete Snapshot Rule. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + name (False, str, None) + String variable. Indicates the name of the Snapshot rule. + + + snapshotrule_id (False, str, None) + String variable. Indicates the ID of the Snapshot rule. + + + new_name (False, str, None) + String variable. Indicates the new name of the Snapshot rule. + + Used for renaming operation. + + + days_of_week (False, list, None) + List of strings to specify days of the week on which the Snapshot rule should be applied. Must be applied for Snapshot rules where the 'time_of_day' parameter is set. + + Optional for the Snapshot rule created with an interval. When 'days_of_week' is not specified for a new Snapshot rule, the rule is applied on every day of the week. + + + interval (False, str, None) + String variable. Indicates the interval between Snapshots. + + When creating a Snapshot rule, specify either "interval" or "time_of_day", but not both. + + + desired_retention (False, int, None) + Integer variable. Indicates the desired Snapshot retention period. + + It is required when creating a new Snapshot rule. + + + time_of_day (False, str, None) + String variable. Indicates the time of the day to take a daily Snapshot, with the format "hh:mm" in 24 hour time format. + + When creating a Snapshot rule, specify either "interval"or "time_of_day" but not both. + + + delete_snaps (optional, bool, False) + Boolean variable to specify whether all Snapshots previously created by this rule should also be deleted when this rule is removed. + + True specifies to delete all previously created Snapshots by this rule while deleting this rule. + + False specifies to retain all previously created Snapshots while deleting this rule. + + + state (True, str, None) + String variable indicates the state of Snapshot rule. + + For "Delete" operation only, it should be set to "absent". + + For all Create, Modify or Get details operation it should be set to "present". + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get details of an existing snapshot rule by name + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + state: "present" + + - name: Get details of an existing snapshot rule by id + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + snapshotrule_id: "{{snapshotrule_id}}" + state: "present" + + - name: Create new snapshot rule by interval + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + interval: "{{interval}}" + days_of_week: + - Monday + desired_retention: "{{desired_retention}}" + state: "present" + + + - name: Create new snapshot rule by time_of_day and days_of_week + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + desired_retention: "{{desired_retention}}" + days_of_week: + - Monday + - Wednesday + - Friday + time_of_day: "{{time_of_day}}" + state: "present" + + - name: Modify existing snapshot rule to time_of_day and days_of_week + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + days_of_week: + - Monday + - Wednesday + - Friday + - Sunday + time_of_day: "{{time_of_day}}" + state: "present" + + - name: Modify existing snapshot rule to interval + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + interval: "{{interval}}" + state: "present" + + - name: Delete an existing snapshot rule by name + dellemc.powerstore.snapshotrule: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{name}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, true) + Whether or not the resource has changed. + + +snapshotrule_details (When snapshot rule exists, complex, {'days_of_week': ['Sunday', 'Thursday'], 'desired_retention': 24, 'id': 'afa86b51-1171-498f-9786-2c78c33b4c14', 'interval': 'Five_Minutes', 'name': 'Sample_snapshot_rule', 'policies': [], 'time_of_day': None}) + Details of the snapshot rule. + + + id (, str, ) + The system generated ID given to the snapshot rule. + + + name (, str, ) + Name of the snapshot rule. + + + days_of_week (, list, ) + List of string to specify days of the week on which the rule should be applied. + + + time_of_day (, str, ) + The time of the day to take a daily snapshot. + + + interval (, str, ) + The interval between snapshots. + + + desired_retention (, int, ) + Desired snapshot retention period. + + + policies (, complex, ) + The protection policies details of the snapshot rule. + + + id (, str, ) + The protection policy ID in which the snapshot rule is selected. + + + name (, str, ) + Name of the protection policy in which the snapshot rule is selected. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) + diff --git a/docs/modules/vcenter.rst b/docs/modules/vcenter.rst new file mode 100644 index 0000000..98009d8 --- /dev/null +++ b/docs/modules/vcenter.rst @@ -0,0 +1,262 @@ +.. _vcenter_module: + + +vcenter -- Manage vCenter on a PowerStore storage system +======================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing vCenter on a PowerStore Storage System includes adding a vCenter, getting details, modifying, and removing a vCenter. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + vcenter_id (optional, str, None) + Unique identifier of the vCenter instance. + + + address (optional, str, None) + IP address of vCenter, in IPv4, IPv6, hostname format. + + Mandatory while adding a vCenter. + + To modify the address, a new address of the same vCenter must be passed. + + + vcenter_username (optional, str, None) + User name to login to vcenter. + + Mandatory while adding a vCenter. + + *vcenter_password* needs to be provided to modify the user name. + + + vcenter_password (optional, str, None) + Password to login to vcenter. + + Mandatory while adding a vCenter. + + + vasa_provider_credentials (optional, dict, None) + Credentials required for registering VASA vendor provider. + + + username (True, str, None) + Username of the local user account which will be used by vSphere to register VASA provider. + + Mandatory while registering VASA provider. + + + password (True, str, None) + Password of the local user account which will be used by vSphere to register VASA provider. + + Mandatory while registering VASA provider. + + + + delete_vasa_provider (optional, bool, None) + Whether to remove VASA provider. + + When ``true``, remove the VASA provider from vCenter. This will only happen if provider is not connected to any other PowerStore system. + + ``false`` is the API default. + + + state (optional, str, present) + The state of the vCenter instance after the task is performed. + + For get, create, and modify operations it should be set to "present". + + + update_password (optional, str, always) + This parameter controls the way the *vcenter_password* is updated during addition and modification of the vCenter. + + ``always`` will update password for each execution. + + ``on_create`` will only set while adding a vCenter or modifying the *vcenter_username.* + + For modifying *vcenter_password*, set the *update_password* to ``always``. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - In unified+ deployment, the one vCenter instance residing in the PowerStore cluster will be prepopulated and cannot be deleted, nor may any other vCenter be added. + - For unified deployment, one external vCenter may be configured if desired. + - The *check_mode* is supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get details of vCenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + + - name: Add a vcenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + address: "XX.XX.XX.XX" + vcenter_username: "user-name" + vcenter_password: "password" + update_password: "on_create" + vasa_provider_credentials: + username: "admin" + password: "pass" + + - name: Modify a vCenter attribute + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + address: "XX.XX.XX.YY" + vcenter_username: "user-name" + vcenter_password: "password" + update_password: "always" + + - name: Remove a vcenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + delete_vasa_provider: true + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Shows whether or not the resource has changed. + + +vcenter_details (When vCenter exists., complex, {'id': '0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd', 'instance_uuid': 'c4c14fbb-828b-40f3-99bb-5bd4db723516', 'address': '10.x.x.x', 'username': 'administrator', 'version': '7.0.3', 'vendor_provider_status': 'Online', 'vendor_provider_status_l10n': 'Online', 'virtual_machines': [], 'datastores': [], 'vsphere_host': []}) + Details of the vCenter instance. + + + id (, str, ) + Unique identifier of vCenter instance. + + + instance_uuid (, str, ) + UUID instance of vCenter. + + + address (, str, ) + IP address of vCenter hosts, in IPv4, IPv6 or hostname format. + + + username (, str, ) + User name to login to vCenter. + + + version (, str, ) + Version of vCenter including its build number. Was added in PowerStore version 3.0.0.0. + + + vendor_provider_status (, list, ) + General status of the VASA vendor provider in vCenter. + + + vendor_provider_status_l10n (, str, ) + Localized message string corresponding to vendor_provider_status. + + + virtual_machines (, list, ) + Virtual machines associated with vCenter. + + + datastores (, list, ) + Data stores that exist on a specific vCenter. Was added in PowerStore version 3.0.0.0. + + + vsphere_host (, list, ) + All the vSphere hosts that exist on a specific vCenter. Was added in PowerStore version 3.0.0.0. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Bhavneet Sharma (@sharmb5) + diff --git a/docs/modules/volume.rst b/docs/modules/volume.rst new file mode 100644 index 0000000..b8c317d --- /dev/null +++ b/docs/modules/volume.rst @@ -0,0 +1,622 @@ +.. _volume_module: + + +volume -- Manage volumes on a PowerStore storage system +======================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing volume on PowerStore storage system includes create volume, get details of volume, modify volume attributes, map or unmap volume to host/host group, and delete volume. + +Volume module also supports start or end of a metro configuration for a volume, clone, refresh and restore a volume. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + vol_name (optional, str, None) + Unique name of the volume. This value must contain 128 or fewer printable unicode characters. + + Required when creating a volume. All other functionalities on a volume are supported using volume name or ID. + + + vg_name (optional, str, None) + The name of the volume group. A volume can optionally be assigned to a volume group at the time of creation. + + Use the Volume Group Module for modification of the assignment. + + + vol_id (optional, str, None) + The 36 character long ID of the volume, automatically generated when a volume is created. + + Cannot be used while creating a volume. All other functionalities on a volume are supported using volume name or ID. + + + size (optional, float, None) + Size of the volume. Minimum volume size is 1MB. Maximum volume size is 256TB. Size must be a multiple of 8192. + + Required in case of create and expand volume. + + + cap_unit (optional, str, None) + Volume size unit. + + Used to signify unit of the size provided for creation and expansion of volume. + + It defaults to 'GB', if not specified. + + + new_name (optional, str, None) + The new volume name for the volume, used in case of rename functionality. + + + description (optional, str, None) + Description for the volume. + + Optional parameter when creating a volume. + + To modify, pass the new value in description field. + + + app_type (optional, str, None) + Application type to indicate the intended use of the volume. + + + app_type_other (optional, str, None) + Application type for volume when *app_type* is set to ``*Other`` types. + + + protection_policy (optional, str, None) + The protection_policy of the volume. + + To represent policy, both name or ID can be used interchangably. The module will detect both. + + A volume can be assigned a protection policy at the time of creation of the volume or later. + + The policy can also be changed for a given volume by simply passing the new value. + + The policy can be removed by passing an empty string. + + Check examples for more clarity. + + + performance_policy (optional, str, None) + The performance_policy for the volume. + + A volume can be assigned a performance policy at the time of creation of the volume, or later. + + The policy can also be changed for a given volume, by simply passing the new value. + + Check examples for more clarity. + + If not given, performance policy will be 'medium'. + + + host (optional, str, None) + Host to be mapped/unmapped to a volume. If not specified, an unmapped volume is created. Only one of the host or host group can be supplied in one call. + + To represent host, both name or ID can be used interchangeably. The module will detect both. + + + hostgroup (optional, str, None) + Hostgroup to be mapped/unmapped to a volume. If not specified, an unmapped volume is created. + + Only one of the host or host group can be mapped in one call. + + To represent a hostgroup, both name or ID can be used interchangeably. The module will detect both. + + + mapping_state (optional, str, None) + Define whether the volume should be mapped to a host or hostgroup. + + Value mapped - indicates that the volume should be mapped to the host or host group. + + Value unmapped - indicates that the volume should not be mapped to the host or host group. + + Only one of a host or host group can be supplied in one call. + + + hlu (False, int, None) + Logical unit number for the host/host group volume access. + + Optional parameter when mapping a volume to host/host group. + + HLU modification is not supported. + + + clone_volume (optional, dict, None) + Details of the volume clone. + + + name (optional, str, None) + Name of the clone set to be created. + + + description (optional, str, None) + Description of the clone. + + + host (optional, str, None) + Unique identifier or name of the host to be attached to the clone. + + + host_group (optional, str, None) + Unique identifier or name of the host group to be attached to the clone. + + + logical_unit_number (optional, int, None) + logical unit number when creating a mapped volume. + + If no host_id or host_group_id is specified, logical_unit_number is ignored. + + + protection_policy (optional, str, None) + The protection policy of the clone set to be created. + + + performance_policy (optional, str, None) + The performance policy of the clone set to be created. + + + + source_volume (optional, str, None) + Unique identifier or name of the volume to refresh from. + + + source_snap (optional, str, None) + Unique identifier or name of the source snapshot that will be used for the restore operation. + + + create_backup_snap (optional, bool, None) + Indicates whether a backup snapshot of the target volume will be created or not. + + + backup_snap_profile (optional, dict, None) + Details of the backup snapshot set to be created. + + + name (optional, str, None) + Name of the backup snapshot set to be created. + + The default name of the volume snapshot is the date and time when the snapshot is taken. + + + description (optional, str, None) + Description of the backup snapshot set. + + + performance_policy (optional, str, None) + Performance policy assigned to the snapshot. + + + expiration_timestamp (optional, str, None) + Time after which the snapshot set can be auto-purged. + + + + state (True, str, None) + Define whether the volume should exist or not. + + Value present - indicates that the volume should exist on the system. + + Value absent - indicates that the volume should not exist on the system. + + + remote_system (False, str, None) + The remote system to which metro relationship will be established. + + The remote system must support metro volume. + + This is mandatory while configuring a metro volume. + + To represent remote system, both name and ID are interchangeable. + + This parameter is added in PowerStore version 3.0.0.0. + + + remote_appliance_id (False, str, None) + A remote system appliance ID to which volume will be assigned. + + This parameter is added in PowerStore version 3.0.0.0. + + + end_metro_config (False, bool, False) + Whether to end the metro session from a volume. + + This is mandatory for end metro configuration operation. + + + delete_remote_volume (False, bool, None) + Whether to delete the remote volume during removal of metro session. + + This is parameter is added in the PowerStore version 3.0.0.0. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - To create a new volume, vol_name and size is required. cap_unit, description, vg_name, performance_policy, and protection_policy are optional. + - Parameter new_name should not be provided when creating a new volume. + - The size is a required parameter for expand volume. + - Clones or Snapshots of a deleted production volume or a clone are not deleted. + - A volume that is attached to a host/host group, or that is part of a volume group cannot be deleted. + - If volume in metro session, volume can only be modified, refreshed and restored when session is in the pause state. + - The Check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + size: 5 + cap_unit: "{{cap_unit}}" + state: 'present' + description: 'Description' + performance_policy: 'low' + protection_policy: 'protection_policy_name' + vg_name: "{{vg_name}}" + mapping_state: 'mapped' + host: "{{host_name}}" + app_type: "Relational_Databases_Other" + app_type_other: "MaxDB" + + - name: Get volume details using ID + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_id: "{{result.volume_details.id}}" + state: "present" + + - name: Modify volume size, name, description, protection, performance policy and app_type + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + new_name: "{{new_name}}" + vol_name: "{{vol_name}}" + state: "present" + size: 2 + performance_policy: 'high' + description: 'new description' + protection_policy: '' + app_type: "Business_Applications_CRM" + + - name: Map volume to a host with HLU + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + state: 'present' + mapping_state: 'mapped' + host: 'host1' + hlu: 12 + + - name: Clone a volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + clone_volume: + name: 'test_name' + description: 'test description' + host: 'test_host' + host_group: 'test_host_group' + logical_unit_number: 1 + protection_policy: 'TEST_PP' + performance_policy: 'low' + state: "present" + + - name: Refresh a volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + source_volume_name: 'test1' + create_backup_snap: true + backup_snap_profile: + name: 'refresh_backup_snap' + description: 'test refresh_backup_snap' + expiration_timestamp: '2022-12-23T01:20:00Z' + performance_policy: 'low' + state: "present" + + - name: Restore a volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + source_snap: 'refresh_backup_snap' + create_backup_snap: true + backup_snap_profile: + name: 'restore_snap_2' + description: 'test backup snap' + expiration_timestamp: '2022-12-23T01:20:00Z' + performance_policy: 'low' + state: "present" + + - name: Configure a metro volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + remote_system: "remote-D123" + state: "present" + + - name: End a metro volume configuration + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_name: "{{vol_name}}" + end_metro_config: True + delete_remote_volume: True + state: "present" + + - name: Delete volume + dellemc.powerstore.volume: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vol_id: "{{result.volume_details.id}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +is_volume_cloned (always, bool, false) + Whether or not the clone of volume is created. + + +is_volume_refreshed (always, bool, false) + Whether or not the volume is refreshed. + + +is_volume_restored (always, bool, false) + Whether or not the volume is restored. + + +volume_details (When volume exists, complex, {'appliance_id': 'A1', 'creation_timestamp': '2022-01-06T05:41:59.381459+00:00', 'description': 'Volume created', 'hlu_details': [], 'host': [], 'host_group': [], 'id': '634e4b95-e7bd-49e7-957b-6dc932642464', 'is_replication_destination': False, 'location_history': None, 'mapped_volumes': [], 'migration_session_id': None, 'name': 'sample_volume', 'nguid': 'nguid.ac8ab0e2506d99be8ccf096800e29e40', 'node_affinity': 'System_Select_At_Attach', 'node_affinity_l10n': 'System Select At Attach', 'nsid': 54768, 'performance_policy': {'id': 'default_medium', 'name': 'Medium'}, 'performance_policy_id': 'default_medium', 'protection_data': {'copy_signature': None, 'created_by_rule_id': None, 'created_by_rule_name': None, 'creator_type': 'User', 'creator_type_l10n': 'User', 'expiration_timestamp': None, 'family_id': '634e4b95-e7bd-49e7-957b-6dc932642464', 'is_app_consistent': False, 'parent_id': None, 'source_id': None, 'source_timestamp': None}, 'protection_policy': {'id': '4bbb6333-59e4-489c-9015-c618d3e8384b', 'name': 'sample_protection_policy'}, 'snapshots': [{'id': '2a07be43-xxxx-4fd0-xxxx-18eaa4081bd9', 'name': 'sample_snap_2'}], 'protection_policy_id': '4bbb6333-59e4-489c-9015-c618d3e8384b', 'size': 1073741824, 'state': 'Ready', 'state_l10n': 'Ready', 'type': 'Primary', 'type_l10n': 'Primary', 'volume_groups': [], 'wwn': 'naa.68ccf09800ac8ab0e2506d99bee29e40'}) + Details of the volume. + + + app_type (, str, ) + Application type indicating the intended use of the volume. + + + app_type_other (, str, ) + Application type for volume when app_type is set to *Other. + + + id (, str, ) + The system generated ID given to the volume. + + + name (, str, ) + Name of the volume. + + + size (, int, ) + Size of the volume. + + + description (, str, ) + description about the volume. + + + performance_policy_id (, str, ) + The performance policy for the volume. + + + protection_policy_id (, str, ) + The protection policy of the volume. + + + snapshots (, complex, ) + List of snapshot associated with the volume. + + + id (, str, ) + The system generated ID given to the snapshot. + + + name (, str, ) + Name of the snapshot. + + + + volume_groups (, complex, ) + The volume group details of the volume. + + + id (, str, ) + The system generated ID given to the volume group. + + + name (, str, ) + Name of the volume group. + + + + host (, complex, ) + Hosts details mapped to the volume. + + + id (, str, ) + The Host ID mapped to the volume. + + + name (, str, ) + Name of the Host mapped to the volume. + + + + host_group (, complex, ) + Host groups details mapped to the volume. + + + id (, str, ) + The Host group ID mapped to the volume. + + + name (, str, ) + Name of the Host group mapped to the volume. + + + + hlu_details (, complex, ) + HLU details for mapped host/host group. + + + host_group_id (, str, ) + The Host group ID mapped to the volume. + + + host_id (, str, ) + The Host ID mapped to the volume. + + + id (, str, ) + The HLU ID. + + + logical_unit_number (, int, ) + Logical unit number for the host/host group volume access. + + + + wwn (, str, ) + The world wide name of the volume. + + + nsid (, int, ) + NVMe Namespace unique identifier in the NVME subsystem. Used for volumes attached to NVMEoF hosts. + + + nguid (, int, ) + NVMe Namespace globally unique identifier. Used for volumes attached to NVMEoF hosts. + + + node_affinity (, str, ) + This attribute shows which node will be advertised as the optimized IO path to the volume. + + + metro_replication_session_id (, str, ) + The ID of the metro replication session assigned to volume. + + + mapped_volumes (, complex, ) + This is the inverse of the resource type host_volume_mapping association. + + + id (, str, ) + Unique identifier of a mapping between a host and a volume. + + + logical_unit_number (, int, ) + Logical unit number for the host volume access. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Ambuj Dubey (@AmbujDube) +- Manisha Agrawal (@agrawm3) +- Ananthu S Kuttattu (@kuttattz) +- Bhavneet Sharma (@Bhavneet-Sharma) + diff --git a/docs/modules/volumegroup.rst b/docs/modules/volumegroup.rst new file mode 100644 index 0000000..229f9a2 --- /dev/null +++ b/docs/modules/volumegroup.rst @@ -0,0 +1,395 @@ +.. _volumegroup_module: + + +volumegroup -- Manage volume groups on a PowerStore Storage System +================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing volume group on PowerStore Storage System includes creating new volume group, adding volumes to volume group, removing volumes from volume group, clone of a volume group, refresh of a volume group and restore of volume group. + +Module also include renaming volume group, modifying volume group, and deleting volume group. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell PowerStore Storage System. Ansible 2.12, 2.13 or 2.14 + + + +Parameters +---------- + + vg_name (False, str, None) + The name of the volume group. + + + vg_id (False, str, None) + The id of the volume group. + + It can be used only for Modify, Add/Remove, or Delete operation. + + + volumes (optional, list, None) + This is a list of volumes. + + Either the volume ID or name must be provided for adding/removing existing volumes from a volume group. + + If volumes are given, then vol_state should also be specified. + + + vol_state (optional, str, None) + String variable. Describes the state of volumes inside a volume group. + + If volume is given, then vol_state should also be specified. + + + new_vg_name (optional, str, None) + The new name of the volume group. + + + description (optional, str, None) + Description about the volume group. + + + protection_policy (False, str, None) + String variable. Represents Protection policy id or name used for volume group. + + Specifying an empty string or "" removes the existing protection policy from volume group. + + + is_write_order_consistent (False, bool, None) + A boolean flag to indicate whether Snapshot sets of the volume group will be write-order consistent. + + If this parameter is not specified, the array by default sets it to true. + + + source_vg (optional, str, None) + ID or name of the volume group to refresh from. + + + source_snap (optional, str, None) + ID or name of the snapshot to restore from. + + + create_backup_snap (optional, bool, None) + Specifies whether a backup snapshot set of the target volume group needs to be created before attempting refresh or restore. + + If not specified it will be set to True. + + + backup_snap_profile (optional, dict, None) + Snapshot volume group request. + + + name (optional, str, None) + Name of snapshot set to be created. + + + description (optional, str, None) + Description of the snapshot set. + + + expiration_timestamp (optional, str, None) + Time after which the snapshot set can be auto-purged. + + + + vg_clone (optional, dict, None) + Parameters to support clone of a volume group. + + + name (True, str, None) + Name for the clone volume group. + + + description (optional, str, None) + Description for the clone volume group. + + + protection_policy (optional, str, None) + ID or name of the protection policy to assign to the clone volume. + + + + state (True, str, None) + Define whether the volume group should exist or not. + + + array_ip (True, str, None) + IP or FQDN of the PowerStore management system. + + + verifycert (True, bool, None) + Boolean variable to specify whether to validate SSL certificate or not. + + True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. + + False - indicates that the SSL certificate should not be verified. + + + user (True, str, None) + The username of the PowerStore host. + + + password (True, str, None) + The password of the PowerStore host. + + + timeout (optional, int, 120) + Time after which the connection will get terminated. + + It is to be mentioned in seconds. + + + port (optional, int, None) + Port number for the PowerStore array. + + If not passed, it will take 443 as default. + + + + + +Notes +----- + +.. note:: + - Parameter vol_state is mandatory if volumes are provided. + - A protection policy can be specified either for an volume group, or for the individual volumes inside the volume group. + - A volume can be a member of at most one volume group. + - Specifying "protection_policy" as empty string or "" removes the existing protection policy from a volume group. + - The check_mode is not supported. + - The modules present in this collection named as 'dellemc.powerstore' are built to support the Dell PowerStore storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create volume group without protection policy + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "{{vg_name}}" + description: "This volume group is for ansible" + state: "present" + + - name: Get details of volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "{{vg_name}}" + state: "present" + + - name: Add volumes to volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "{{vg_name}}" + state: "present" + volumes: + - "7f879569-676c-4749-a06f-c2c30e09b295" + - "68e4dad5-5de5-4644-a98f-6d4fb916e169" + - "Ansible_Testing" + vol_state: "present-in-group" + + - name: Remove volumes from volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "{{vg_name}}" + state: "present" + volumes: + - "7f879569-676c-4749-a06f-c2c30e09b295" + - "Ansible_Testing" + vol_state: "absent-in-group" + + - name: Rename volume group and change is_write_order_consistent flag + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "{{vg_name}}" + new_vg_name: "{{new_vg_name}}" + is_write_order_consistent: False + state: "present" + + - name: Get details of volume group by ID + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_id: "{{vg_id}}" + state: "present" + + - name: Delete volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + name: "{{new_vg_name}}" + state: "absent" + + - name: Refresh a volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "ansible_vg" + source_vg: "vg_source" + create_backup_snap: True + backup_snap_profile: + name: "test_snap" + state: "present" + + - name: Restore a volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "ansible_vg" + source_snap: "snap_source" + create_backup_snap: True + backup_snap_profile: + name: "test_snap_restore" + state: "present" + + - name: Clone a volume group + dellemc.powerstore.volumegroup: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + vg_name: "ansible_vg" + vg_clone: + name: "ansible_vg_clone" + protection_policy: "policy1" + state: "present" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +add_vols_to_vg (When value exists, bool, false) + A boolean flag to indicate whether volume/s got added to volume group. + + +create_vg (When value exists, bool, false) + A boolean flag to indicate whether volume group got created. + + +delete_vg (When value exists, bool, false) + A boolean flag to indicate whether volume group got deleted. + + +modify_vg (When value exists, bool, false) + A boolean flag to indicate whether volume group got modified. + + +remove_vols_from_vg (When value exists, bool, false) + A boolean flag to indicate whether volume/s got removed from volume group. + + +volume_group_details (When volume group exists, complex, {'creation_timestamp': '2022-01-06T05:41:59.381459+00:00', 'description': 'Volume group created', 'id': '634e4b95-e7bd-49e7-957b-6dc932642464', 'is_importing': False, 'is_protectable': True, 'is_replication_destination': False, 'is_write_order_consistent': False, 'location_history': None, 'mapped_volumes': [], 'migration_session_id': None, 'name': 'sample_volume_group', 'placement_rule': 'Same_Appliance', 'protection_data': {'copy_signature': None, 'created_by_rule_id': None, 'created_by_rule_name': None, 'creator_type': 'User', 'creator_type_l10n': 'User', 'expiration_timestamp': None, 'family_id': '634e4b95-e7bd-49e7-957b-6dc932642464', 'is_app_consistent': False, 'parent_id': None, 'source_id': None, 'source_timestamp': None}, 'protection_policy': {'id': '4bbb6333-59e4-489c-9015-c618d3e8384b', 'name': 'sample_protection_policy'}, 'protection_policy_id': '4bbb6333-59e4-489c-9015-c618d3e8384b', 'type': 'Primary', 'type_l10n': 'Primary', 'volumes': [], 'snapshots': [{'id': '2179802f-f975-434a-b317-9e55460e3e08', 'name': 'test_snapshot'}, {'id': '33d8990b-a468-4708-ba42-8b41af545939', 'name': 'backup.2022-08-04T10:57:41Z 001113180'}]}) + Details of the volume group. + + + id (, str, ) + The system generated ID given to the volume group. + + + name (, str, ) + Name of the volume group. + + + description (, str, ) + description about the volume group. + + + protection_policy_id (, str, ) + The protection policy of the volume group. + + + is_write_order_consistent (, bool, ) + A boolean flag to indicate whether snapshot sets of the volume group will be write-order consistent. + + + type (, str, ) + The type of the volume group. + + + snapshots (, complex, ) + The snapshots associated with the volume group. + + + id (, str, ) + ID of the snapshot. + + + name (, str, ) + Name of the snapshot. + + + + volumes (, complex, ) + The volumes details of the volume group. + + + id (, str, ) + The system generated ID given to the volume associated with the volume group. + + + name (, str, ) + The name of the volume associated with the volume group. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) +- Arindam Datta (@dattaarindam) + diff --git a/galaxy.yml b/galaxy.yml index 6a9e5a8..27647a5 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: dellemc name: powerstore # The version of the collection. Must be compatible with semantic versioning -version: 1.8.0 +version: 1.9.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md @@ -27,6 +27,7 @@ authors: - Bhavneet Sharma - Trisha Datta - Ananthu S Kuttattu +- Pavan Mudunuri ### OPTIONAL but strongly recommended # A short summary description of the collection @@ -53,13 +54,13 @@ tags: [storage] dependencies: {} # The URL of the originating SCM repository -repository: https://github.com/dell/ansible-powerstore/tree/1.8.0 +repository: https://github.com/dell/ansible-powerstore/tree/1.9.0 # The URL to any online docs -documentation: https://github.com/dell/ansible-powerstore/tree/1.8.0/docs +documentation: https://github.com/dell/ansible-powerstore/tree/1.9.0/docs # The URL to the homepage of the collection/project -homepage: https://github.com/dell/ansible-powerstore/tree/1.8.0 +homepage: https://github.com/dell/ansible-powerstore/tree/1.9.0 # The URL to the collection issue tracker issues: https://www.dell.com/community/Automation/bd-p/Automation diff --git a/plugins/modules/certificate.py b/plugins/modules/certificate.py index 61b8eb6..eca61a0 100644 --- a/plugins/modules/certificate.py +++ b/plugins/modules/certificate.py @@ -262,7 +262,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreCertificate(object): diff --git a/plugins/modules/cluster.py b/plugins/modules/cluster.py index b169665..a0c07a0 100644 --- a/plugins/modules/cluster.py +++ b/plugins/modules/cluster.py @@ -628,7 +628,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreCluster(object): diff --git a/plugins/modules/dns.py b/plugins/modules/dns.py index de4cf21..0d523e0 100644 --- a/plugins/modules/dns.py +++ b/plugins/modules/dns.py @@ -129,7 +129,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreDns(object): diff --git a/plugins/modules/email.py b/plugins/modules/email.py index 9e78571..ecad2ee 100644 --- a/plugins/modules/email.py +++ b/plugins/modules/email.py @@ -213,7 +213,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreEmail(object): diff --git a/plugins/modules/filesystem.py b/plugins/modules/filesystem.py index 52e68b9..d9f04ef 100644 --- a/plugins/modules/filesystem.py +++ b/plugins/modules/filesystem.py @@ -15,20 +15,20 @@ description: - Supports the provisioning operations on a filesystem such as create, modify, delete and get the details of a filesystem. - extends_documentation_fragment: - dellemc.powerstore.powerstore author: - Arindam Datta (@dattaarindam) +- Trisha Datta (@trisha-dell) options: filesystem_name: description: - - Name of the file system. Mutually exclusive with filesystem_id. + - Name of the file system. Mutually exclusive with I(filesystem_id). Mandatory only for create operation. type: str filesystem_id: description: - - Unique id of the file system. Mutually exclusive with filesystem_name. + - Unique id of the file system. Mutually exclusive with I(filesystem_name). type: str description: description: @@ -37,18 +37,18 @@ nas_server: description: - Name or ID of the NAS Server on which the file system is created. - Mandatory parameter whenever filesystem_name is provided, + Mandatory parameter whenever I(filesystem_name) is provided, since filesystem names are unique only within a NAS server. type: str size: description: - Size that the file system presents to the host or end user. - Mandatory only for create operation. + - Mandatory only for create operation. type: int cap_unit: description: - Capacity unit for the size. - - It defaults to 'GB', if not specified. + - It defaults to C(GB), if not specified. choices: ['GB', 'TB'] type: str access_policy: @@ -59,65 +59,59 @@ locking_policy: description: - File system locking policies. - ADVISORY- No lock checking for NFS and honor SMB lock range only for SMB. - MANDATORY- Honor SMB and NFS lock range. + - C(ADVISORY)- No lock checking for NFS and honor SMB lock range only for SMB. + - C(MANDATORY)- Honor SMB and NFS lock range. choices: [ADVISORY, MANDATORY] type: str folder_rename_policy: description: - File system folder rename policies for the file system with multi-protocol access enabled. - - ALL_ALLOWED - All protocols are allowed to rename directories without + - C(ALL_ALLOWED) - All protocols are allowed to rename directories without any restrictions. - - SMB_FORBIDDEN - A directory rename from the SMB protocol will be + - C(SMB_FORBIDDEN) - A directory rename from the SMB protocol will be denied if at least one file is opened in the directory or in one of its child directories. - - All_FORBIDDEN - Any directory rename request will be denied regardless + - C(All_FORBIDDEN) - Any directory rename request will be denied regardless of the protocol used, if at least one file is opened in the directory or in one of its child directories. choices: ['ALL_ALLOWED', 'SMB_FORBIDDEN', 'ALL_FORBIDDEN'] type: str smb_properties: description: - - Advance settings for SMB. It contains below optional candidate variables. + - Advance settings for SMB. It contains optional candidate variables listed below. type: dict suboptions: is_smb_sync_writes_enabled: description: - Indicates whether the synchronous writes option is enabled on the - file system. + file system. type: bool - required: False is_smb_no_notify_enabled: description: - Indicates whether notifications of changes to directory file - structure are enabled. + structure are enabled. type: bool - required: False is_smb_op_locks_enabled: description: - Indicates whether opportunistic file locking is enabled on the file - system. + system. type: bool - required: False is_smb_notify_on_access_enabled: description: - Indicates whether file access notifications are enabled on the file - system. + system. type: bool - required: False is_smb_notify_on_write_enabled: description: - Indicates whether file write notifications are enabled on the file - system. + system. type: bool - required: False smb_notify_on_change_dir_depth: description: - - Integer variable , determines the lowest directory level to which the - enabled notifications apply. minimum value is 1. + - Determines the lowest directory level to which the + enabled notifications apply. minimum value is C(1). type: int - required: False protection_policy: description: - Name or ID of the protection policy applied to the file system. @@ -134,39 +128,115 @@ description: - Grace period of soft limit. type: int - required: False grace_period_unit: description: - Unit of the grace period of soft limit. type: str choices: ['days', 'weeks', 'months'] - required: False default_hard_limit: description: - Default hard limit of user quotas and tree quotas. type: int - required: False default_soft_limit: description: - Default soft limit of user quotas and tree quotas. type: int - required: False cap_unit: description: - Capacity unit for default hard & soft limit. type: str choices: ['GB', 'TB'] - required: False + flr_attributes: + description: + - The attributes for file retention. + - Can only be provided when the I(config_type) is C(GENERAL). + type: dict + suboptions: + mode: + description: + - The FLR type of the file system. + - It can only be provided during creation of a filesystem. + type: str + choices: ['Enterprise', 'Compliance'] + minimum_retention: + description: + - The shortest retention period for which files + on an FLR-enabled file system can be locked + and protected from deletion. + type: str + default_retention: + description: + - The default retention period that is used in an + FLR-enabled file system when a file is locked and + a retention period is not specified. + type: str + maximum_retention: + description: + - The longest retention period for which files on an + FLR-enabled file system can be locked and protected + from deletion. + type: str + auto_lock: + description: + - Indicates whether to automatically lock files + in an FLR-enabled file system. + type: bool + auto_delete: + description: + - Indicates whether locked files will be automatically + deleted from an FLR-enabled file system once their + retention periods have expired. + - This setting can only be applied to a mounted FLR + enabled file systems. + type: bool + policy_interval: + description: + - Indicates how long to wait (in seconds) after files + are modified before the files are automatically locked. + - This setting can only be applied to mounted FLR enabled + file systems. + type: int + config_type: + description: + - Indicates the file system type. + - Cannot be modified. + choices: ['GENERAL', 'VMWARE'] + type: str + is_async_mtime_enabled: + description: + - Indicates whether asynchronous MTIME is + enabled on the file system or protocol + snaps that are mounted writeable. + type: bool + file_events_publishing_mode: + description: + - State of the event notification services + for all file systems of the NAS server. + - It can only be set to C(NFS_ONLY) when + I(config_typ) is set to C(VMWARE). + choices: ['DISABLE', 'SMB_ONLY', 'NFS_ONLY', 'ALL'] + type: str + host_io_size: + description: + - Typical size of writes from the server or other + computer using the VMware file system to the + storage system. + - Can only be set when the I(config_type) is C(VMWARE). + - Cannot be modified. + choices: ['VMWARE_8K', 'VMWARE_16K', 'VMWARE_32K', 'VMWARE_64K'] + type: str state: description: - Define whether the filesystem should exist or not. choices: ['absent', 'present'] - required: True + required: true type: str notes: - It is recommended to remove the protection policy before deleting the filesystem. -- The check_mode is not supported. +- The I(check_mode) is not supported. +- The pattern for I(minimum_retention), I(default_retention) + and I(maximum_retention) is (^\d+[DMY])|(^infinite$). ''' EXAMPLES = r''' @@ -194,6 +264,10 @@ default_hard_limit: 3 default_soft_limit: 2 protection_policy: "{{protection_policy_id}}" + config_type: "VMWARE" + is_async_mtime_enabled: True + file_events_publishing_mode: "NFS_ONLY" + host_io_size: "VMWARE_16K" state: "present" - name: Modify File System by id @@ -212,6 +286,13 @@ grace_period_unit: 'weeks' default_hard_limit: 2 default_soft_limit: 1 + is_async_mtime_enabled: True + file_events_publishing_mode: "ALL" + flr_attributes: + mode: "Enterprise" + minimum_retention: "5D" + default_retention: "1M" + maximum_retention: "1Y" state: "present" - name: Get File System details by id @@ -231,8 +312,6 @@ password: "{{password}}" filesystem_id: "{{result_fs.filesystem_details.id}}" state: "absent" - - ''' RETURN = r''' @@ -241,7 +320,6 @@ returned: always type: bool sample: "false" - filesystem_details: description: Details of the filesystem. returned: When filesystem exists @@ -307,6 +385,110 @@ snapshots: description: Id and name of the snapshots of a filesystem. type: list + is_async_MTime_enabled: + description: Indicates whether asynchronous MTIME is enabled on the file system. + type: bool + file_events_publishing_mode: + description: State of the event notification services for all file systems of the NAS server. + type: str + config_type: + description: Indicates the file system type. + type: str + host_io_size: + description: Typical size of writes from the server or other + computer using the VMware file system to the storage system. + type: str + flr_attributes: + description: The file retention attributes. + type: complex + contains: + mode: + description: The FLR type of the file system. + type: str + minimum_retention: + description: The shortest retention period for which files on an + FLR-enabled file system can be locked and protected + from deletion. + type: str + default_retention: + description: The default retention period that is used in an FLR-enabled + file system when a file is locked and a retention period is + not specified. + type: str + maximum_retention: + description: The longest retention period for which files on an FLR-enabled + file system can be locked and protected from deletion. + type: str + auto_lock: + description: Indicates whether to automatically lock files in an FLR-enabled file system. + type: bool + auto_delete: + description: Indicates whether locked files will be automatically deleted from an + FLR-enabled file system once their retention periods have expired. + type: bool + policy_interval: + description: Indicates how long to wait (in seconds) after files are + modified before the files are automatically locked. + type: int + has_protected_files: + description: Indicates whether FLR file system has protected files. + type: bool + clock_time: + description: Per file system clock used to track the retention date. + type: str + maximum_retention_date: + description: Maximum date and time that has been set on any locked file + in an FLR-enabled file system, which means that the file + system itself will be protected until this date and time. + type: str + access_type: + description: Indicates whether the snapshot directory or protocol + access is granted to the file system snapshot. + type: str + creation_timestamp: + description: Time, in seconds, when the snapshot was created. + type: str + creator_type: + description: Snapshot creator type. + type: str + expiration_timestamp: + description: Time, in seconds, when the snapshot will expire. + type: str + filesystem_type: + description: Indicates the type of a file system. + type: str + folder_rename_policy: + description: File system folder rename policies for the file + system with multiprotocol access enabled. + type: str + is_modified: + description: Indicates whether the snapshot may have + changed since it was created. + type: bool + is_quota_enabled: + description: Indicates whether quota is enabled. + type: bool + is_smb_notify_on_write_enabled: + description: Indicates whether file writes notifications + are enabled on the file system. + type: bool + is_smb_sync_writes_enabled: + description: Indicates whether the synchronous writes + option is enabled on the file system. + type: bool + last_refresh_timestamp: + description: Time, in seconds, when the snapshot was last refreshed. + type: str + last_writable_timestamp: + description: If not mounted, and was previously mounted, + the time (in seconds) of last mount. + type: str + parent_id: + description: Unique identifier of the object of the parent of this file system. + type: str + smb_notify_on_change_dir_depth: + description: Lowest directory level to which the enabled notifications apply, if any. + type: int sample: { "access_policy": "Native", "access_policy_l10n": "Native", @@ -354,7 +536,7 @@ ''' from ansible.module_utils.basic import AnsibleModule -from ansible_collections.dellemc.powerstore.plugins.module_utils.storage.dell\ +from ansible_collections.dellemc.powerstore.plugins.module_utils.storage.dell \ import utils import logging @@ -370,7 +552,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreFileSystem(object): @@ -547,41 +729,47 @@ def get_protection_policy(self, protection_policy): LOG.error(msg) self.module.fail_json(msg=msg, **utils.failure_codes(e)) + def create_filesystem_dict_params(self, adv_parameters): + """Create a filesystem.""" + smb_properties = self.module.params['smb_properties'] + if self.module.params['flr_attributes'] is not None: + adv_parameters['flr_attributes'] = {} + for key, value in self.module.params['flr_attributes'].items(): + if value is not None: + adv_parameters['flr_attributes'][key] = value + + if self.protection_policy_id: + adv_parameters['protection_policy_id'] = \ + self.protection_policy_id + + if smb_properties: + for key, value in smb_properties.items(): + if value is not None: + adv_parameters[key] = value + + return adv_parameters + def create_filesystem(self, name, nas_server_id, size_total): """Create a filesystem.""" try: LOG.info("Attempting to create filesystem name " "%s", name) adv_parameters = dict() - description = self.module.params['description'] - if description: - adv_parameters['description'] = description - - access_policy = self.module.params['access_policy'] - if access_policy: - adv_parameters['access_policy'] = \ - self.get_enum_keys(access_policy) - - locking_policy = self.module.params['locking_policy'] - if locking_policy: - adv_parameters['locking_policy'] = \ - self.get_enum_keys(locking_policy) - - folder_rename_policy = self.module.params['folder_rename_policy'] - if folder_rename_policy: - adv_parameters['folder_rename_policy'] = \ - self.get_enum_keys(folder_rename_policy) - - if self.protection_policy_id: - adv_parameters['protection_policy_id'] = \ - self.protection_policy_id - - smb_properties = self.module.params['smb_properties'] - if smb_properties: - for key, value in smb_properties.items(): - if value is not None: - adv_parameters[key] = value + adv_param_list_enum = ['access_policy', 'locking_policy', + 'folder_rename_policy', 'config_type', + 'host_io_size', 'file_events_publishing_mode'] + + if self.module.params['description'] is not None: + adv_parameters['description'] = self.module.params['description'] + + if self.module.params['is_async_mtime_enabled'] is not None: + adv_parameters['is_async_MTime_enabled'] = self.module.params['is_async_mtime_enabled'] + + for param in adv_param_list_enum: + if self.module.params[param] is not None: + adv_parameters[param] = self.get_enum_keys(self.module.params[param]) + adv_parameters = self.create_filesystem_dict_params(adv_parameters) resp = self.provisioning.create_filesystem( name=name, nas_server_id=nas_server_id, @@ -613,124 +801,160 @@ def delete_filesystem(self, filesystem_id): LOG.error(msg) self.module.fail_json(msg=msg, **utils.failure_codes(e)) + def to_modify_quota_limits(self, quota_defaults, filesystem_details, + modify_parameters, enable_quota): + """Check if modification of quota limits is needed""" + default_hard_limit = quota_defaults['default_hard_limit'] + default_soft_limit = quota_defaults['default_soft_limit'] + cap_unit = quota_defaults['cap_unit'] + + if (default_hard_limit is not None) or \ + (default_soft_limit is not None): + if not cap_unit: + cap_unit = 'GB' + if default_hard_limit is not None: + param_hard_limit = utils.get_size_bytes( + default_hard_limit, cap_unit) + if param_hard_limit != \ + filesystem_details['default_hard_limit']: + modify_parameters['default_hard_limit'] = \ + param_hard_limit + enable_quota = True + if default_soft_limit is not None: + param_soft_limit = utils.get_size_bytes( + default_soft_limit, cap_unit) + if param_soft_limit != \ + filesystem_details['default_soft_limit']: + modify_parameters['default_soft_limit'] = \ + param_soft_limit + enable_quota = True + return enable_quota, modify_parameters + + def to_modify_filesystem_quota(self, filesystem_details, modify_parameters, quota_defaults): + """Determines if any modification required on a specific + filesystem instance.""" + + LOG.info("Checking if modification is required for quota ") + grace_period = quota_defaults['grace_period'] + grace_period_unit = quota_defaults['grace_period_unit'] + enable_quota = False + is_quota_enabled = filesystem_details['is_quota_enabled'] + + if grace_period is not None: + if not grace_period_unit: + grace_period_unit = 'days' + param_grace_period = get_graceperiod_seconds( + grace_period, grace_period_unit) + if param_grace_period != \ + filesystem_details['grace_period']: + modify_parameters[ + 'grace_period'] = param_grace_period + enable_quota = True + + enable_quota, modify_parameters = self.to_modify_quota_limits(quota_defaults, filesystem_details, + modify_parameters, enable_quota) + if enable_quota and (not is_quota_enabled): + modify_parameters['is_quota_enabled'] = enable_quota + + LOG.debug("Modify Dict %s", str(modify_parameters)) + return modify_parameters + + def to_modify_protection_policy(self, modify_parameters, filesystem_details): + """Check if modification of protection policy is needed""" + + if self.protection_policy_id and ( + (filesystem_details['protection_policy'] is None) or + (filesystem_details['protection_policy'] is not None and + self.protection_policy_id != + filesystem_details['protection_policy']['id'])): + modify_parameters['protection_policy_id'] = \ + self.protection_policy_id + + # to handle the remove with "" case + if self.protection_policy_id == "" and ( + filesystem_details['protection_policy'] is not None): + modify_parameters['protection_policy_id'] = \ + self.protection_policy_id + + return modify_parameters + + def to_modify_flr_attributes(self, modify_parameters, filesystem_details): + """Check if modification of file retention attributes is needed""" + flr_attributes = self.module.params['flr_attributes'] + if flr_attributes is not None: + modify_parameters['flr_attributes'] = {} + for key, value in flr_attributes.items(): + if value is not None and \ + filesystem_details['flr_attributes'][key] != value: + modify_parameters['flr_attributes'][key] = value + if modify_parameters['flr_attributes'] == {}: + del modify_parameters['flr_attributes'] + + return modify_parameters + + def to_modify_smb_attributes(self, modify_parameters, filesystem_details): + """Check if modification of SMB properties is needed""" + smb_properties = self.module.params['smb_properties'] + if smb_properties: + for key, value in smb_properties.items(): + if value is not None and \ + filesystem_details[key] != value: + modify_parameters[key] = value + + return modify_parameters + + def to_modify_flr_smb_quota(self, modify_parameters, filesystem_details): + """Check if modification of file retention, SMB or Quota attributes is needed""" + modify_parameters = self.to_modify_flr_attributes(modify_parameters, + filesystem_details) + + # advance smb attributes + modify_parameters = self.to_modify_smb_attributes(modify_parameters, + filesystem_details) + quota_defaults = self.module.params['quota_defaults'] + if quota_defaults: + modify_parameters = self.to_modify_filesystem_quota(filesystem_details, + modify_parameters, + quota_defaults) + + return modify_parameters + def to_modify_filesystem(self, filesystem_details): """Determines if any modification required on a specific filesystem instance.""" - try: - LOG.info("Checking if Modify required for filesystem ") - modify_parameters = dict() - - description = self.module.params['description'] - if (description is not None) and description != \ - filesystem_details['description']: - modify_parameters['description'] = description - - if (self.total_size > 0) and \ - (filesystem_details['size_total'] != self.total_size): - modify_parameters['size_total'] = self.total_size - - access_policy = self.module.params['access_policy'] - if access_policy and access_policy !=\ - (filesystem_details['access_policy']).upper(): - modify_parameters['access_policy'] = \ - self.get_enum_keys(access_policy) - - locking_policy = self.module.params['locking_policy'] - if locking_policy and locking_policy != ( - filesystem_details['locking_policy']).upper(): - modify_parameters['locking_policy'] = \ - self.get_enum_keys(locking_policy) - - folder_rename_policy = self.module.params['folder_rename_policy'] - if folder_rename_policy and folder_rename_policy != ( - filesystem_details['folder_rename_policy']).upper(): - modify_parameters['folder_rename_policy'] = \ - self.get_enum_keys(folder_rename_policy) - - if self.protection_policy_id and ( - (filesystem_details['protection_policy'] is None) or - (filesystem_details['protection_policy'] is not None) and - self.protection_policy_id != - filesystem_details['protection_policy']['id']): - modify_parameters['protection_policy_id'] = \ - self.protection_policy_id - - # to handle the remove with "" case - if self.protection_policy_id == "" and ( - filesystem_details['protection_policy'] is not None): - modify_parameters['protection_policy_id'] = \ - self.protection_policy_id - - # advance smb attributes - smb_properties = self.module.params['smb_properties'] - if smb_properties: - for key, value in smb_properties.items(): - if value is not None and \ - filesystem_details[key] != value: - modify_parameters[key] = value - - # quota defaults - quota_defaults = self.module.params['quota_defaults'] - if quota_defaults: - grace_period = quota_defaults['grace_period'] - grace_period_unit = quota_defaults['grace_period_unit'] - default_hard_limit = quota_defaults['default_hard_limit'] - default_soft_limit = quota_defaults['default_soft_limit'] - cap_unit = quota_defaults['cap_unit'] - enable_quota = False - is_quota_enabled = filesystem_details['is_quota_enabled'] - - if grace_period is not None: - if not grace_period_unit: - grace_period_unit = 'days' - param_grace_period = get_graceperiod_seconds( - grace_period, grace_period_unit) - if param_grace_period !=\ - filesystem_details['grace_period']: - modify_parameters[ - 'grace_period'] = param_grace_period - enable_quota = True - - if default_hard_limit < 0 or default_soft_limit < 0: - msg = "hard or soft limit cannot be less than '0'" - LOG.error(msg) - self.module.fail_json(msg=msg) + LOG.info("Checking if Modify required for filesystem ") + modify_parameters = dict() - if (default_hard_limit is not None) or \ - (default_soft_limit is not None): - if not cap_unit: - cap_unit = 'GB' - - if default_hard_limit is not None: - param_hard_limit = utils.get_size_bytes( - default_hard_limit, cap_unit) - if param_hard_limit != \ - filesystem_details['default_hard_limit']: - modify_parameters['default_hard_limit'] = \ - param_hard_limit - enable_quota = True - - if default_soft_limit is not None: - param_soft_limit = utils.get_size_bytes( - default_soft_limit, cap_unit) - if param_soft_limit != \ - filesystem_details['default_soft_limit']: - modify_parameters['default_soft_limit'] = \ - param_soft_limit - enable_quota = True - - if enable_quota and (not is_quota_enabled): - modify_parameters['is_quota_enabled'] = enable_quota - - LOG.info("Modify Dict %s", str(modify_parameters)) - return modify_parameters + description = self.module.params['description'] + if (description is not None) and description != \ + filesystem_details['description']: + modify_parameters['description'] = description - except Exception as e: - msg = 'Failed to determine if modify filesystem required with ' \ - 'error {0}'.format(str(e)) - LOG.error(msg) - self.module.fail_json(msg=msg, **utils.failure_codes(e)) + is_async_mtime_enabled = self.module.params['is_async_mtime_enabled'] + if (is_async_mtime_enabled is not None) and is_async_mtime_enabled != \ + filesystem_details['is_async_MTime_enabled']: + modify_parameters['is_async_MTime_enabled'] = is_async_mtime_enabled + + if (self.total_size > 0) and \ + (filesystem_details['size_total'] != self.total_size): + modify_parameters['size_total'] = self.total_size + + adv_param_list_enum = ['access_policy', 'locking_policy', + 'folder_rename_policy', 'file_events_publishing_mode'] + + for param in adv_param_list_enum: + if self.module.params[param] is not None and (filesystem_details[param] is None or + self.module.params[param] != + (filesystem_details[param]).upper()): + modify_parameters[param] = \ + self.get_enum_keys(self.module.params[param]) + + modify_parameters = self.to_modify_protection_policy(modify_parameters, filesystem_details) + + modify_parameters = self.to_modify_flr_smb_quota(modify_parameters, filesystem_details) + + return modify_parameters def modify_filesystem(self, filesystem_id, modify_parameters): """Modify FileSystem attributes.""" @@ -801,7 +1025,17 @@ def get_enum_keys(self, user_input): "MANDATORY": "Mandatory", "ALL_ALLOWED": "All_Allowed", "SMB_FORBIDDEN": "SMB_Forbidden", - "ALL_FORBIDDEN": "All_Forbidden" + "ALL_FORBIDDEN": "All_Forbidden", + "GENERAL": "General", + "VMWARE": "VMware", + "DISABLE": "None", + "SMB_ONLY": "SMB_Only", + "NFS_ONLY": "NFS_Only", + "ALL": "All", + "VMWARE_8K": "VMware_8K", + "VMWARE_16K": "VMware_16K", + "VMWARE_32K": "VMware_32K", + "VMWARE_64K": "VMware_64K" } return enum_dict[user_input] @@ -811,6 +1045,54 @@ def get_enum_keys(self, user_input): LOG.error(msg) self.module.fail_json(msg=msg, **utils.failure_codes(e)) + def set_params(self, size, cap_unit, nas_server, protection_policy, + filesystem_name, filesystem_id): + fs_details = None + if size is not None: + if cap_unit: + self.total_size = utils.get_size_bytes(size, cap_unit) + else: + self.total_size = utils.get_size_bytes(size, 'GB') + min_size = utils.get_size_bytes(3, 'GB') + if self.total_size < min_size: + err_msg = "Size must be minimum of 3GB" + LOG.error(err_msg) + self.module.fail_json(msg=err_msg) + + if (cap_unit is not None) and not size: + self.module.fail_json(msg="cap_unit can be specified along " + "with size") + if protection_policy is not None: + if protection_policy == "": + self.protection_policy_id = protection_policy + else: + self.protection_policy_id = self.get_protection_policy( + protection_policy=protection_policy) + if filesystem_name and nas_server: + fs_details = self.get_filesystem_details( + filesystem_name=filesystem_name, nas_server_id=nas_server) + elif filesystem_id: + fs_details = self.get_filesystem_details( + filesystem_id=filesystem_id) + return size, protection_policy, fs_details + + def validate_modify(self, fs_details): + + non_modify = ['config_type', 'host_io_size'] + for param in non_modify: + if fs_details and self.module.params[param] is not None and \ + fs_details[param] != self.get_enum_keys(self.module.params[param]): + self.module.fail_json(msg=param + " cannot be modified.") + + if self.module.params['quota_defaults'] is not None: + limit_types = ['default_hard_limit', 'default_soft_limit'] + for limit in limit_types: + if self.module.params['quota_defaults'][limit] is not None and \ + self.module.params['quota_defaults'][limit] < 0: + msg = limit + " cannot be less than '0'" + LOG.error(msg) + self.module.fail_json(msg=msg) + def perform_module_operation(self): clusters = self.get_clusters() if len(clusters) > 0: @@ -835,60 +1117,33 @@ def perform_module_operation(self): filesystem_details=None ) - fs_details = None fs_id = None to_modify = False to_modify_dict = None - - if size is not None: - if cap_unit: - self.total_size = utils.get_size_bytes(size, cap_unit) - else: - self.total_size = utils.get_size_bytes(size, 'GB') - min_size = utils.get_size_bytes(3, 'GB') - if self.total_size < min_size: - err_msg = "Size must be minimum of 3GB" - LOG.error(err_msg) - self.module.fail_json(msg=err_msg) - - if (cap_unit is not None) and not size: - self.module.fail_json(msg="cap_unit can be specified along " - "with size") - if nas_server: nas_server = self.get_nas_server(nas_server=nas_server) - if protection_policy is not None: - if protection_policy == "": - self.protection_policy_id = protection_policy - else: - self.protection_policy_id = self.get_protection_policy( - protection_policy=protection_policy) + size, protection_policy, fs_details = \ + self.set_params(size, cap_unit, nas_server, protection_policy, + filesystem_name, filesystem_id) - if filesystem_name and nas_server: - fs_details = self.get_filesystem_details( - filesystem_name=filesystem_name, nas_server_id=nas_server) - elif filesystem_id: - fs_details = self.get_filesystem_details( - filesystem_id=filesystem_id) - if fs_details: - fs_id = fs_details['id'] - to_modify_dict = self.to_modify_filesystem(fs_details) - if to_modify_dict: - to_modify = True - LOG.info("FileSystem Details: %s , To Modify %s", fs_details, - to_modify) + self.validate_modify(fs_details) if not fs_details and state == 'present': fs_id = self.create_filesystem( name=filesystem_name, nas_server_id=nas_server, size_total=self.total_size) + changed = True fs_details = self.get_filesystem_details( filesystem_id=fs_id) - to_modify_dict = self.to_modify_filesystem(fs_details) - to_modify = True if to_modify_dict else to_modify - changed = True + if fs_details: + fs_id = fs_details['id'] + to_modify_dict = self.to_modify_filesystem(fs_details) + if to_modify_dict: + to_modify = True + LOG.info("FileSystem Details: %s , To Modify %s", fs_details, + to_modify) if to_modify and state == 'present': self.modify_filesystem( filesystem_id=fs_id, @@ -928,45 +1183,56 @@ def get_powerstore_filesystem_parameters(): """This method provides the parameters required for the ansible filesystem modules on PowerStore""" return dict( - filesystem_name=dict(required=False, type='str'), - filesystem_id=dict(required=False, type='str'), - description=dict(required=False, type='str'), - nas_server=dict(required=False, type='str'), - size=dict(required=False, type='int'), - cap_unit=dict(required=False, type='str', choices=['GB', 'TB']), - access_policy=dict(required=False, type='str', + filesystem_name=dict(type='str'), + filesystem_id=dict(type='str'), + description=dict(type='str'), + nas_server=dict(type='str'), + size=dict(type='int'), + cap_unit=dict(type='str', choices=['GB', 'TB']), + access_policy=dict(type='str', choices=['NATIVE', 'UNIX', 'WINDOWS']), - locking_policy=dict(required=False, type='str', + locking_policy=dict(type='str', choices=['ADVISORY', 'MANDATORY']), - folder_rename_policy=dict(required=False, type='str', + folder_rename_policy=dict(type='str', choices=['ALL_ALLOWED', 'SMB_FORBIDDEN', 'ALL_FORBIDDEN']), + config_type=dict(type='str', choices=['GENERAL', 'VMWARE']), + is_async_mtime_enabled=dict(type='bool'), + file_events_publishing_mode=dict(type='str', + choices=['DISABLE', 'SMB_ONLY', 'NFS_ONLY', 'ALL']), + host_io_size=dict(type='str', + choices=['VMWARE_8K', 'VMWARE_16K', 'VMWARE_32K', 'VMWARE_64K']), + flr_attributes=dict( + type='dict', options=dict( + mode=dict(type='str', choices=['Enterprise', 'Compliance']), + minimum_retention=dict(type='str'), + default_retention=dict(type='str'), + maximum_retention=dict(type='str'), + auto_lock=dict(type='bool'), + auto_delete=dict(type='bool'), + policy_interval=dict(type='int') + ) + ), smb_properties=dict( type='dict', options=dict( - is_smb_sync_writes_enabled=dict(type='bool', required=False), - is_smb_no_notify_enabled=dict(type='bool', required=False), - is_smb_op_locks_enabled=dict(type='bool', required=False), - is_smb_notify_on_access_enabled=dict(type='bool', - required=False), - is_smb_notify_on_write_enabled=dict(type='bool', - required=False), - smb_notify_on_change_dir_depth=dict(type='int', - required=False) - ), - required=False + is_smb_sync_writes_enabled=dict(type='bool'), + is_smb_no_notify_enabled=dict(type='bool'), + is_smb_op_locks_enabled=dict(type='bool'), + is_smb_notify_on_access_enabled=dict(type='bool'), + is_smb_notify_on_write_enabled=dict(type='bool'), + smb_notify_on_change_dir_depth=dict(type='int') + ) ), - protection_policy=dict(required=False, type='str'), + protection_policy=dict(type='str'), quota_defaults=dict( type='dict', options=dict( - grace_period=dict(type='int', required=False), - grace_period_unit=dict(type='str', required=False, + grace_period=dict(type='int'), + grace_period_unit=dict(type='str', choices=['days', 'weeks', 'months']), - default_hard_limit=dict(type='int', required=False), - default_soft_limit=dict(type='int', required=False), - cap_unit=dict(type='str', required=False, - choices=['GB', 'TB']) - ), - required=False + default_hard_limit=dict(type='int'), + default_soft_limit=dict(type='int'), + cap_unit=dict(type='str', choices=['GB', 'TB']) + ) ), state=dict(required=True, type='str', choices=['present', 'absent']) ) diff --git a/plugins/modules/filesystem_snapshot.py b/plugins/modules/filesystem_snapshot.py index 75c1506..ccfe050 100644 --- a/plugins/modules/filesystem_snapshot.py +++ b/plugins/modules/filesystem_snapshot.py @@ -253,7 +253,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreFilesystemSnapshot(object): diff --git a/plugins/modules/host.py b/plugins/modules/host.py index c1f38b3..6819d17 100644 --- a/plugins/modules/host.py +++ b/plugins/modules/host.py @@ -375,7 +375,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' # DO NOT CHANGE BELOW PORT_TYPES SEQUENCE AS ITS USED IN SCRIPT USING INDEX PORT_TYPES = ["iSCSI", "FC", "NVMe"] diff --git a/plugins/modules/hostgroup.py b/plugins/modules/hostgroup.py index 5b9cb10..bc0f379 100644 --- a/plugins/modules/hostgroup.py +++ b/plugins/modules/hostgroup.py @@ -225,7 +225,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreHostgroup(object): diff --git a/plugins/modules/info.py b/plugins/modules/info.py index 46cc46f..c9408b8 100644 --- a/plugins/modules/info.py +++ b/plugins/modules/info.py @@ -13,19 +13,26 @@ short_description: Gathers information about PowerStore Storage entities description: - Gathers the list of specified PowerStore Storage System entities, includes - block/file provisioning modules, replication modules and configuration modules. -- Block provisioning module includes volumes, volume groups, hosts, host groups, - snapshot rules, protection policies. + block/file provisioning modules, replication modules, configuration modules, + and virtualization modules. +- Block provisioning module includes volumes, volume groups, hosts, + host groups, snapshot rules, and protection policies. - File provisioning module includes NAS servers, NFS exports, SMB shares, - tree quotas, user quotas, file systems. -- Replication module includes replication rules, replication sessions, remote system. -- Configuration module includes cluster nodes, network, roles, local users, appliances, - security configs, certificates, AD/LDAP servers, LDAP accounts, LDAP domain. -- It also includes DNS/NTP servers, smtp configs, email destinations, remote support, remote support contacts. + tree quotas, user quotas, and file systems. +- Replication module includes replication rules, replication sessions, and + remote system. +- Virtualization module includes vCenters and virtual volumes. +- Configuration module includes cluster nodes, networks, roles, local users, + appliances, security configs, certificates, AD/LDAP servers, LDAP accounts, + and LDAP domain. +- It also includes DNS/NTP servers, smtp configs, email destinations, + remote support, and remote support contacts. author: - Arindam Datta (@dattaarindam) - Vivek Soni (@v-soni11) - Akash Shendge (@shenda1) +- Bhavneet Sharma (@sharmb5) +- Trisha Datta (@trisha-dell) extends_documentation_fragment: - dellemc.powerstore.powerstore options: @@ -65,14 +72,17 @@ - Remote support contacts - remote_support_contact. - LDAP accounts - ldap_account. - LDAP domain - ldap_domain. + - All vCenters - vcenter. + - Virtual volumes - virtual_volume. required: True elements: str choices: [vol, vg, host, hg, node, protection_policy, snapshot_rule, nas_server, nfs_export, smb_share, tree_quota, user_quota, file_system, replication_rule, replication_session, - remote_system, network, role, ldap_account, user, appliance, ad, ldap, - security_config, certificate, dns, ntp, smtp_config, - email_notification, remote_support, remote_support_contact, ldap_domain] + remote_system, network, role, ldap_account, user, appliance, ad, + ldap, security_config, certificate, dns, ntp, smtp_config, + email_notification, remote_support, remote_support_contact, + ldap_domain, vcenter, virtual_volume] type: list filters: description: @@ -109,8 +119,8 @@ type: bool default: False notes: -- Pagination is not supported for role, local user, security configs, LDAP accounts and LDAP domain. If - all_pages is passed, it will be ignored. +- Pagination is not supported for role, local user, security configs, LDAP + accounts and LDAP domain. If all_pages is passed, it will be ignored. - The check_mode is supported. ''' @@ -335,6 +345,24 @@ filter_operator: 'equal' filter_value: 'LDAPS' +- name: Get list of vCenters + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - vcenter + +- name: Get list of virtual volumes + dellemc.powerstore.info: + array_ip: "{{array_ip}}" + verifycert: "{{verifycert}}" + user: "{{user}}" + password: "{{password}}" + gather_subset: + - virtual_volume + ''' RETURN = r''' @@ -985,6 +1013,227 @@ "id": "00000003-0708-0000-0000-000004000080" } ] +vCenter: + description: Provide details of all vCenters. + type: list + returned: When vCenter is in a given gather_subset + contains: + id: + description: Unique identifier of vCenter. + type: str + instance_uuid: + description: UUID instance of vCenter. + type: str + address: + description: IP address of vCenter host, in IPv4, IPv6 or hostname + format. + type: str + username: + description: Username to login to vCenter. + type: str + version: + description: Version of vCenter including its build number. Was + added in PowerStore version 3.0.0.0. + type: str + vendor_provider_status: + description: General status of the VASA vendor provider in vCenter. + type: str + vendor_provider_status_l10n: + description: Localized message string corresponding to + vendor_provider_status. + type: str + virtual_machines: + description: Virtual Machine associated with vCenter. + type: list + datastores: + description: Datastores that exists on a specific vCenter. Was + added in PowerStore version 3.0.0.0. + type: list + vsphere_hosts: + description: All vSphere hosts that exists on a specific vCenter. + Was added in PowerStore version 3.0.0.0. + type: list + sample: [ + { + "id": "0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd", + "instance_uuid": "0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd", + "address": "10.x.x.x", + "username": "administrator", + "version": "7.0.3", + "vendor_provider_status": "Online", + "vendor_provider_status_l10n": "Online", + "virtual_machines": [], + "datastores": [], + "vsphere_hosts": [] + } + ] +VirtualVolume: + description: Provides details of all virtual volumes. + type: list + returned: When virtual_volume is in a given gather_subset + contains: + id: + description: The unique identifier of the virtual volume. + type: str + name: + description: The name of the virtual volume, based on metadata provided by vSphere. + type: str + size: + description: The size of the virtual volume in bytes. + type: int + type: + description: The logical type of a virtual volume. + type: str + usage_type: + description: VMware's usage of the vVol. + type: str + appliance_id: + description: The appliance where the virtual volume resides. + type: str + storage_container_id: + description: The storage container where the virtual volume resides. + type: str + io_priority: + description: The I/O priority for quality of service rules. + type: str + profile_id: + description: The ID of the storage profile governing this virtual volume. + type: str + replication_group_id: + description: The unique identifier of the replication group object that this virtual volume belongs to. + type: str + creator_type: + description: + - Creator type of the storage resource. + - User - A resource created by a user. + - System - A resource created by the replication engine. + - Scheduler - A resource created by the snapshot scheduler. + type: str + is_readonly: + description: Indicates whether the virtual volume is read-only. + type: bool + migration_session_id: + description: If the virtual volume is part of a migration activity, the session ID for that migration. + type: str + virtual_machine_uuid: + description: UUID of the virtual machine that owns this virtual volume. + type: str + family_id: + description: Family id of the virtual volume. + type: str + parent_id: + description: For snapshots and clones, the ID of the parent virtual volume. + type: str + source_id: + description: Id of the virtual volume from which the content has been sourced. + type: str + source_timestamp: + description: The source data time-stamp of the virtual volume. + type: str + creation_timestamp: + description: Timestamp of the moment virtual volume was created at. + type: str + naa_name: + description: The NAA name used by hosts for I/O. + type: str + is_replication_destination: + description: Indicates whether virtual volume is replication destination or not. + type: bool + location_history: + description: Storage resource location history. + type: complex + contains: + from_appliance_id: + description: Unique identifier of the appliance from which the volume was relocated. + type: str + to_appliance_id: + description: Unique identifier of the appliance to which the volume was relocated. + type: str + reason: + description: + - Reason for storage resource relocation. + - Initial - Initial placement. + - Manual - Manual migration operation initiated by user. + - Recommended - Storage system recommended migration. + type: str + migrated_on: + description: Time when the storage resource location changed. + type: str + reason_l10n: + description: Localized message string corresponding to reason. + type: str + protection_policy_id: + description: The unique identifier of the protection policy applied to this virtual volume. + type: str + nsid: + description: NVMe Namespace unique identifier in the NVMe subsystem. + type: str + nguid: + description: NVMe Namespace globally unique identifier. + type: str + type_l10n: + description: Localized message string corresponding to type. + type: str + usage_type_l10n: + description: Localized message string corresponding to usage_type. + type: str + io_priority_l10n: + description: Localized message string corresponding to io_priority. + type: str + creator_type_l10n: + description: Localized message string corresponding to creator_type. + type: str + host_virtual_volume_mappings: + description: Virtual volume mapping details. + type: complex + contains: + id: + description: Unique identifier of a mapping between a host and a virtual volume. + type: str + host_id: + description: Unique identifier of a host attached to a virtual volume. + type: str + host_group_id: + description: Unique identifier of a host group attached to a virtual volume. + type: str + virtual_volume_id: + description: Unique identifier of the virtual volume to which the host is attached. + type: str + + sample: [ + { + "id": "85643b54-9429-49ee-b7c3-b061fcdaab7c", + "name": "test-centos_2.vmdk", + "size": 17179869184, + "type": "Primary", + "usage_type": "Data", + "appliance_id": "A1", + "storage_container_id": "4dff1460-4d1e-48b6-98d8-cae8d7bf63b5", + "io_priority": "Medium", + "profile_id": "f4e5bade-15a2-4805-bf8e-52318c4ce443", + "replication_group_id": null, + "creator_type": "User", + "is_readonly": false, + "migration_session_id": null, + "virtual_machine_uuid": "503629e5-8677-b26f-bf2d-e9f639bcc77f", + "family_id": "9ce8d828-14e3-44f8-bde1-a97f440a7259", + "parent_id": null, + "source_id": null, + "source_timestamp": null, + "creation_timestamp": "2022-12-27T10:01:32.622+00:00", + "naa_name": "naa.68ccf09800918d7f008769d29bc6a43a", + "is_replication_destination": false, + "location_history": null, + "protection_policy_id": null, + "nsid": 5114, + "nguid": "nguid.918d7f008769d29b8ccf096800c6a43a", + "type_l10n": "Primary", + "usage_type_l10n": "Data", + "io_priority_l10n": "Medium", + "creator_type_l10n": "User", + "host_virtual_volume_mappings": [] +} + ] ''' from ansible.module_utils.basic import AnsibleModule @@ -1003,7 +1252,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreInfo(object): @@ -1173,7 +1422,15 @@ def __init__(self): 'ldap_domain': { 'func': self.configuration.get_ldap_domain_configuration_list, 'display_as': 'LDAPDomain' - } + }, + 'vcenter': { + 'func': self.configuration.get_vcenters, + 'display_as': 'vCenter' + }, + 'virtual_volume': { + 'func': self.configuration.get_virtual_volume_list, + 'display_as': 'VirtualVolume' + }, } LOG.info('Got Py4ps connection object %s', self.conn) @@ -1330,7 +1587,7 @@ def get_powerstore_info_parameters(): 'security_config', 'certificate', 'dns', 'ntp', 'smtp_config', 'email_notification', 'remote_support', 'remote_support_contact', - 'ldap_account', 'ldap_domain']), + 'ldap_account', 'ldap_domain', 'vcenter', 'virtual_volume']), filters=dict(type='list', required=False, elements='dict', options=dict(filter_key=dict(type='str', required=True, no_log=False), diff --git a/plugins/modules/job.py b/plugins/modules/job.py index 656f805..8d93315 100644 --- a/plugins/modules/job.py +++ b/plugins/modules/job.py @@ -174,7 +174,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreJob(object): diff --git a/plugins/modules/ldap_account.py b/plugins/modules/ldap_account.py index 4dbf3a4..e1fdb23 100644 --- a/plugins/modules/ldap_account.py +++ b/plugins/modules/ldap_account.py @@ -173,7 +173,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreLDAPAccount(object): diff --git a/plugins/modules/ldap_domain.py b/plugins/modules/ldap_domain.py index 5462443..342a1d9 100644 --- a/plugins/modules/ldap_domain.py +++ b/plugins/modules/ldap_domain.py @@ -354,7 +354,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreLDAPDomain(object): diff --git a/plugins/modules/local_user.py b/plugins/modules/local_user.py index fc929bb..c9e9e46 100644 --- a/plugins/modules/local_user.py +++ b/plugins/modules/local_user.py @@ -185,7 +185,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreLocalUser(object): diff --git a/plugins/modules/nasserver.py b/plugins/modules/nasserver.py index e18ea9d..86ad9b8 100644 --- a/plugins/modules/nasserver.py +++ b/plugins/modules/nasserver.py @@ -299,7 +299,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreNasServer(object): diff --git a/plugins/modules/network.py b/plugins/modules/network.py index 03de570..7ef88c5 100644 --- a/plugins/modules/network.py +++ b/plugins/modules/network.py @@ -498,7 +498,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreNetwork(object): diff --git a/plugins/modules/nfs.py b/plugins/modules/nfs.py index 98a91f5..f6ac8df 100644 --- a/plugins/modules/nfs.py +++ b/plugins/modules/nfs.py @@ -381,7 +381,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreNfsExport(object): diff --git a/plugins/modules/ntp.py b/plugins/modules/ntp.py index 2f784e5..9d77680 100644 --- a/plugins/modules/ntp.py +++ b/plugins/modules/ntp.py @@ -130,7 +130,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreNtp(object): diff --git a/plugins/modules/protectionpolicy.py b/plugins/modules/protectionpolicy.py index baee35b..eb5204c 100644 --- a/plugins/modules/protectionpolicy.py +++ b/plugins/modules/protectionpolicy.py @@ -246,7 +246,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreProtectionpolicy(object): diff --git a/plugins/modules/quota.py b/plugins/modules/quota.py index 131616f..f7c50f6 100644 --- a/plugins/modules/quota.py +++ b/plugins/modules/quota.py @@ -364,7 +364,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreQuota(object): diff --git a/plugins/modules/remote_support.py b/plugins/modules/remote_support.py index 399baad..1984890 100644 --- a/plugins/modules/remote_support.py +++ b/plugins/modules/remote_support.py @@ -371,7 +371,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreRemoteSupport(object): diff --git a/plugins/modules/remote_support_contact.py b/plugins/modules/remote_support_contact.py index 92f88fc..d2ac2f2 100644 --- a/plugins/modules/remote_support_contact.py +++ b/plugins/modules/remote_support_contact.py @@ -141,7 +141,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreRemoteSupportContact(object): diff --git a/plugins/modules/remotesystem.py b/plugins/modules/remotesystem.py index b4656f3..d234a9f 100644 --- a/plugins/modules/remotesystem.py +++ b/plugins/modules/remotesystem.py @@ -318,7 +318,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreRemoteSystem(object): diff --git a/plugins/modules/replicationrule.py b/plugins/modules/replicationrule.py index 65f1f8b..6de4a1e 100644 --- a/plugins/modules/replicationrule.py +++ b/plugins/modules/replicationrule.py @@ -201,7 +201,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreReplicationRule(object): diff --git a/plugins/modules/replicationsession.py b/plugins/modules/replicationsession.py index 3e4edb2..3a6fed4 100644 --- a/plugins/modules/replicationsession.py +++ b/plugins/modules/replicationsession.py @@ -226,7 +226,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' """ =============================================================================== Idempotency table for the replication session ansible module on the basis of diff --git a/plugins/modules/role.py b/plugins/modules/role.py index 3df1f88..c9d42cc 100644 --- a/plugins/modules/role.py +++ b/plugins/modules/role.py @@ -113,7 +113,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreRole(object): diff --git a/plugins/modules/security_config.py b/plugins/modules/security_config.py index f2bff21..2eb0b6b 100644 --- a/plugins/modules/security_config.py +++ b/plugins/modules/security_config.py @@ -116,7 +116,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreSecurityConfig(object): diff --git a/plugins/modules/smbshare.py b/plugins/modules/smbshare.py index 62ebb8c..2db674e 100644 --- a/plugins/modules/smbshare.py +++ b/plugins/modules/smbshare.py @@ -311,7 +311,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreSMBShare(object): diff --git a/plugins/modules/smtp_config.py b/plugins/modules/smtp_config.py index c138ecc..36d7186 100644 --- a/plugins/modules/smtp_config.py +++ b/plugins/modules/smtp_config.py @@ -143,7 +143,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreSmtpConfig(object): diff --git a/plugins/modules/snapshot.py b/plugins/modules/snapshot.py index a254403..2e8e5f1 100644 --- a/plugins/modules/snapshot.py +++ b/plugins/modules/snapshot.py @@ -344,7 +344,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreSnapshot(object): diff --git a/plugins/modules/snapshotrule.py b/plugins/modules/snapshotrule.py index 003b0c2..7737669 100644 --- a/plugins/modules/snapshotrule.py +++ b/plugins/modules/snapshotrule.py @@ -258,7 +258,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerstoreSnapshotrule(object): diff --git a/plugins/modules/vcenter.py b/plugins/modules/vcenter.py new file mode 100644 index 0000000..8a6d0d0 --- /dev/null +++ b/plugins/modules/vcenter.py @@ -0,0 +1,463 @@ +#!/usr/bin/python +# Copyright: (c) 2023, Dell Technologies +# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + +DOCUMENTATION = r''' +--- +module: vcenter +version_added: '1.9.0' +short_description: Manage vCenter on a PowerStore storage system +description: +- Managing vCenter on a PowerStore Storage System includes adding a vCenter, + getting details, modifying, and removing a vCenter. +author: +- Bhavneet Sharma (@sharmb5) +extends_documentation_fragment: + - dellemc.powerstore.powerstore +options: + vcenter_id: + description: + - Unique identifier of the vCenter instance. + type: str + address: + description: + - IP address of vCenter, in IPv4, IPv6, hostname format. + - Mandatory while adding a vCenter. + - To modify the address, a new address of the same vCenter must be passed. + type: str + vcenter_username: + description: + - User name to login to vcenter. + - Mandatory while adding a vCenter. + - I(vcenter_password) needs to be provided to modify the user name. + type: str + vcenter_password: + description: + - Password to login to vcenter. + - Mandatory while adding a vCenter. + type: str + vasa_provider_credentials: + description: + - Credentials required for registering VASA vendor provider. + type: dict + suboptions: + username: + description: + - Username of the local user account which will be used by vSphere to + register VASA provider. + - Mandatory while registering VASA provider. + type: str + required: true + password: + description: + - Password of the local user account which will be used by vSphere to + register VASA provider. + - Mandatory while registering VASA provider. + type: str + required: true + delete_vasa_provider: + description: + - Whether to remove VASA provider. + - When C(true), remove the VASA provider from vCenter. This will only + happen if provider is not connected to any other PowerStore system. + - C(false) is the API default. + type: bool + state: + description: + - The state of the vCenter instance after the task is performed. + - For get, create, and modify operations it should be set to "present". + choices: [ 'present', 'absent'] + default: present + type: str + update_password: + description: + - This parameter controls the way the I(vcenter_password) is updated during + addition and modification of the vCenter. + - C(always) will update password for each execution. + - C(on_create) will only set while adding a vCenter or modifying the + I(vcenter_username.) + - For modifying I(vcenter_password), set the I(update_password) to + C(always). + choices: ['always', 'on_create'] + default: always + type: str + +notes: +- In unified+ deployment, the one vCenter instance residing in the PowerStore + cluster will be prepopulated and cannot be deleted, nor may any other vCenter + be added. +- For unified deployment, one external vCenter may be configured if desired. +- The I(check_mode) is supported. +''' + +EXAMPLES = r''' + - name: Get details of vCenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + + - name: Add a vcenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + address: "XX.XX.XX.XX" + vcenter_username: "user-name" + vcenter_password: "password" + update_password: "on_create" + vasa_provider_credentials: + username: "admin" + password: "pass" + + - name: Modify a vCenter attribute + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + address: "XX.XX.XX.YY" + vcenter_username: "user-name" + vcenter_password: "password" + update_password: "always" + + - name: Remove a vcenter + dellemc.powerstore.vcenter: + array_ip: "{{array_ip}}" + user: "{{user}}" + password: "{{password}}" + verifycert: "{{verifycert}}" + vcenter_id: "24d333-59f-423c-205-c6181ea81b" + delete_vasa_provider: true + state: "absent" +''' + +RETURN = r''' +changed: + description: Shows whether or not the resource has changed. + returned: always + type: bool + sample: "false" +vcenter_details: + description: Details of the vCenter instance. + returned: When vCenter exists. + type: complex + contains: + id: + description: Unique identifier of vCenter instance. + type: str + instance_uuid: + description: UUID instance of vCenter. + type: str + address: + description: IP address of vCenter hosts, in IPv4, IPv6 or hostname + format. + type: str + username: + description: User name to login to vCenter. + type: str + version: + description: Version of vCenter including its build number. Was added in + PowerStore version 3.0.0.0. + type: str + vendor_provider_status: + description: General status of the VASA vendor provider in vCenter. + type: list + vendor_provider_status_l10n: + description: Localized message string corresponding to + vendor_provider_status. + type: str + virtual_machines: + description: Virtual machines associated with vCenter. + type: list + datastores: + description: Data stores that exist on a specific vCenter. Was added + in PowerStore version 3.0.0.0. + type: list + vsphere_host: + description: All the vSphere hosts that exist on a specific vCenter. + Was added in PowerStore version 3.0.0.0. + type: list + sample: { + "id": "0d330d6c-3fe6-41c6-8023-5bd3fa7c61cd", + "instance_uuid": "c4c14fbb-828b-40f3-99bb-5bd4db723516", + "address": "10.x.x.x", + "username": "administrator", + "version": "7.0.3", + "vendor_provider_status": "Online", + "vendor_provider_status_l10n": "Online", + "virtual_machines": [], + "datastores": [], + "vsphere_host": [] + } +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.dellemc.powerstore.plugins.module_utils.storage.\ + dell import utils + +LOG = utils.get_logger('vcenter') + +py4ps_sdk = utils.has_pyu4ps_sdk() +HAS_PY4PS = py4ps_sdk['HAS_Py4PS'] +IMPORT_ERROR = py4ps_sdk['Error_message'] + +py4ps_version = utils.py4ps_version_check() +IS_SUPPORTED_PY4PS_VERSION = py4ps_version['supported_version'] +VERSION_ERROR = py4ps_version['unsupported_version_message'] + +# Application type +APPLICATION_TYPE = 'Ansible/1.9.0' + + +class PowerstoreVCenter(object): + """vCenter operations""" + + def __init__(self): + """Define all the parameters required by this module""" + + self.module_params = utils.get_powerstore_management_host_parameters() + self.module_params.update(get_powerstore_vcenter_parameters()) + + # initialize the Ansible module + self.module = AnsibleModule( + argument_spec=self.module_params, + supports_check_mode=True + ) + + LOG.info("HAS_PY4PS = %s , IMPORT_ERROR = %s", HAS_PY4PS, IMPORT_ERROR) + # SDK version check + if HAS_PY4PS is False: + self.module.fail_json(msg=IMPORT_ERROR) + + LOG.info('IS_SUPPORTED_PY4PS_VERSION = %s, VERSION_ERROR' + ' = %s', IS_SUPPORTED_PY4PS_VERSION, VERSION_ERROR) + if IS_SUPPORTED_PY4PS_VERSION is False: + self.module.fail_json(msg=VERSION_ERROR) + + self.conn = utils.get_powerstore_connection( + self.module.params, + application_type=APPLICATION_TYPE) + self.configuration = self.conn.config_mgmt + + LOG.info('Got Py4ps instance for configuration on PowerStore' + ' %s.', self.configuration) + LOG.info('Check mode flag: %s.', self.module.check_mode) + + def is_vcenter_modify_required(self, vcenter_details): + """ To check if modification is required or not""" + address = self.module.params['address'] + username = self.module.params['vcenter_username'] + vasa_provider = self.module.params['vasa_provider_credentials'] + password = self.module.params['vcenter_password'] + update_password = self.module.params['update_password'] + + modify_dict = dict() + if address is not None and vcenter_details['address'] != address: + modify_dict['address'] = address + if username is not None and vcenter_details['username'] != username: + modify_dict['username'] = username + modify_dict['password'] = self.module.params['vcenter_password'] + if update_password == "always" and password is not None: + modify_dict['password'] = self.module.params['vcenter_password'] + if vasa_provider is not None and \ + vcenter_details['vendor_provider_status'] != "Online": + modify_dict['vasa_provider_credentials'] = vasa_provider + return modify_dict + + def modify_vcenter(self, vcenter_id, modify_params): + """Perform modify operations on a vCenter instance + :param vcenter_id: ID of the vCenter + :param modify_params: Dict containing params to modify for a vCenter + """ + try: + LOG.info('Modifying vCenter %s attributes.', vcenter_id) + if not self.module.check_mode: + self.configuration.modify_vcenter( + vcenter_id=vcenter_id, modify_param_dict=modify_params) + return True + except Exception as e: + msg = f'Modification of vCenter {vcenter_id} failed with error {e}' + LOG.error(msg) + self.module.fail_json(msg=msg, **utils.failure_codes(e)) + + def add_vcenter(self, address, username, password, vasa_provider): + """Add a vCenter to Unified PowerStore system + :param address: IP address of vCenter, in IPv4, IPv6 or host name + format + :param username: Username to log in to vCenter + :param password: Password to log in to vCenter + :param vasa_provider: Dict contains credentials to register VASA + provider + """ + LOG.info("Adding a vCenter.") + if not all([address, username, password]): + err_msg = 'address, vcenter_username and vcenter_password must' \ + ' be passed to add a vCenter.' + LOG.error(err_msg) + self.module.fail_json(msg=err_msg) + try: + add_dict = dict() + add_dict['address'] = address + add_dict['username'] = username + add_dict['password'] = password + if vasa_provider is not None: + add_dict['vasa_provider_credentials'] = vasa_provider + + resp = dict() + if not self.module.check_mode: + resp = self.configuration.add_vcenter(add_params=add_dict) + return resp, True + + except Exception as e: + error_msg = f'Adding of vCenter failed with error {e}.' + LOG.error(error_msg) + self.module.fail_json(msg=error_msg, **utils.failure_codes(e)) + + def delete_vcenter(self, vcenter_id, delete_vasa_provider): + """Delete an vCenter instance from a unified PowerStore version + :param vcenter_id: ID of a vCenter instance + :param delete_vasa_provider: Whether to delete a VASA provider + """ + try: + LOG.info('Deleting vCenter %s', vcenter_id) + if not self.module.check_mode: + self.configuration.\ + remove_vcenter(vcenter_id=vcenter_id, + delete_vasa_provider=delete_vasa_provider) + return True + except Exception as e: + err_msg = f'Deletion of vCenter {vcenter_id} failed with error {e}' + LOG.error(err_msg) + self.module.fail_json(msg=err_msg, **utils.failure_codes(e)) + + def get_vcenter_details(self, vcenter_id): + """Get vCenter details by id""" + + try: + if vcenter_id: + LOG.info('Getting the details of vCenter with ID: ' + '%s', vcenter_id) + resp = self.configuration.get_vcenter_details( + vcenter_id=vcenter_id) + LOG.info('Successfully got the details of vCenter with id: ' + '%s', vcenter_id) + return resp + if vcenter_id is None: + vcenters = self.configuration.get_vcenters() + if vcenters and vcenters[0]['address'] == \ + self.module.params['address']: + LOG.info('Successfully got the details of ' + 'vCenter: %s', vcenters[0]) + return vcenters[0] + + except Exception as e: + msg = f'Get details of vCenter: {vcenter_id} failed with ' \ + f'error : {e}' + if isinstance(e, utils.PowerStoreException) and \ + e.err_code == utils.PowerStoreException.HTTP_ERR and \ + e.status_code == "404": + LOG.error(msg) + return None + LOG.info(msg) + self.module.fail_json(msg=msg, **utils.failure_codes(e)) + + def validate_input_params(self): + """Validate the input parameters""" + + params = ['vcenter_id', 'address', 'vcenter_username', + 'vcenter_password'] + + for param in params: + if utils.is_param_empty(self.module.params[param]): + err_msg = f'Provide the valid {param}.' + self.module.fail_json(msg=err_msg) + + def perform_module_operation(self): + """Performing various module operations""" + vcenter_id = self.module.params['vcenter_id'] + address = self.module.params['address'] + vcenter_username = self.module.params['vcenter_username'] + vcenter_password = self.module.params['vcenter_password'] + vasa_provider_credentials = self.module.params[ + 'vasa_provider_credentials'] + delete_vasa_provider = self.module.params['delete_vasa_provider'] + state = self.module.params['state'] + + result = dict( + changed=False, + vcenter_details=dict() + ) + + changed = False + + # Validate input parameters + self.validate_input_params() + + vcenter_details = self.get_vcenter_details(vcenter_id=vcenter_id) + LOG.info("vCenter details are %s", str(vcenter_details)) + if vcenter_details: + vcenter_id = vcenter_details['id'] + result['vcenter_details'] = vcenter_details + modify_params = self.\ + is_vcenter_modify_required(vcenter_details=vcenter_details) + + # create operation + if state == 'present': + if not vcenter_details: + add_resp, changed = self.\ + add_vcenter(address=address, username=vcenter_username, + password=vcenter_password, + vasa_provider=vasa_provider_credentials) + if add_resp: + vcenter_id = add_resp['id'] + elif vcenter_details and modify_params: + changed = self.modify_vcenter(vcenter_id, modify_params) + + elif state == 'absent' and vcenter_details: + changed = self.delete_vcenter(vcenter_id, delete_vasa_provider) + + if changed: + result['vcenter_details'] = self.\ + get_vcenter_details(vcenter_id=vcenter_id) + result['changed'] = changed + self.module.exit_json(**result) + + +def get_powerstore_vcenter_parameters(): + """This method provide the parameters required for the + vCenter operations for PowerStore""" + + return dict( + vcenter_id=dict(), address=dict(), vcenter_username=dict(), + vcenter_password=dict(no_log=True), + vasa_provider_credentials=dict( + type='dict', + options=dict( + username=dict(type='str', required=True), + password=dict(type='str', required=True, no_log=True))), + delete_vasa_provider=dict(type='bool'), + state=dict(type='str', choices=['present', 'absent'], + default='present'), + update_password=dict(type='str', choices=['always', 'on_create'], + default='always') + ) + + +def main(): + """ Create PowerStore vCenter object and perform action on it + based on user input from playbook """ + obj = PowerstoreVCenter() + obj.perform_module_operation() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/volume.py b/plugins/modules/volume.py index 1ac240c..84a9e1f 100644 --- a/plugins/modules/volume.py +++ b/plugins/modules/volume.py @@ -70,13 +70,34 @@ - Optional parameter when creating a volume. - To modify, pass the new value in description field. type: str + app_type: + description: + - Application type to indicate the intended use of the volume. + choices: [Relational_Databases_Other, Relational_Databases_Oracle, + Relational_Databases_SQL_Server, Relational_Databases_PostgreSQL, + Relational_Databases_MySQL, Relational_Databases_IBM_DB2, + Big_Data_Analytics_Other, Big_Data_Analytics_MongoDB, + Big_Data_Analytics_Cassandra, Big_Data_Analytics_SAP_HANA, + Big_Data_Analytics_Spark, Big_Data_Analytics_Splunk, + Big_Data_Analytics_ElasticSearch, Business_Applications_Other, + Business_Applications_ERP_SAP, Business_Applications_CRM, + Business_Applications_Exchange, Business_Applications_Sharepoint, + Healthcare_Other, Healthcare_Epic, Healthcare_MEDITECH, + Healthcare_Allscripts, Healthcare_Cerner, Virtualization_Other, + Virtualization_Virtual_Servers_VSI, Virtualization_Containers_Kubernetes, + Virtualization_Virtual_Desktops_VDI, Other] + type: str + app_type_other: + description: + - Application type for volume when I(app_type) is set to C(*Other) types. + type: str protection_policy: description: - The protection_policy of the volume. - To represent policy, both name or ID can be used interchangably. The module will detect both. - - A volume can be assigned a protection policy at the time of creation of - volume or later as well. + - A volume can be assigned a protection policy at the time of creation of the + volume or later. - The policy can also be changed for a given volume by simply passing the new value. - The policy can be removed by passing an empty string. @@ -86,7 +107,7 @@ description: - The performance_policy for the volume. - A volume can be assigned a performance policy at the time of creation of - the volume, or later as well. + the volume, or later. - The policy can also be changed for a given volume, by simply passing the new value. - Check examples for more clarity. @@ -265,6 +286,8 @@ vg_name: "{{vg_name}}" mapping_state: 'mapped' host: "{{host_name}}" + app_type: "Relational_Databases_Other" + app_type_other: "MaxDB" - name: Get volume details using ID dellemc.powerstore.volume: @@ -275,7 +298,7 @@ vol_id: "{{result.volume_details.id}}" state: "present" -- name: Modify volume size, name, description, protection and performance policy +- name: Modify volume size, name, description, protection, performance policy and app_type dellemc.powerstore.volume: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" @@ -288,6 +311,7 @@ performance_policy: 'high' description: 'new description' protection_policy: '' + app_type: "Business_Applications_CRM" - name: Map volume to a host with HLU dellemc.powerstore.volume: @@ -408,6 +432,12 @@ returned: When volume exists type: complex contains: + app_type: + description: Application type indicating the intended use of the volume. + type: str + app_type_other: + description: Application type for volume when app_type is set to *Other. + type: str id: description: The system generated ID given to the volume. type: str @@ -452,7 +482,7 @@ type: complex contains: id: - description: The host ID mapped to the volume. + description: The Host ID mapped to the volume. type: str name: description: Name of the Host mapped to the volume. @@ -462,7 +492,7 @@ type: complex contains: id: - description: The host group ID mapped to the volume. + description: The Host group ID mapped to the volume. type: str name: description: Name of the Host group mapped to the volume. @@ -472,10 +502,10 @@ type: complex contains: host_group_id: - description: The host group ID mapped to the volume. + description: The Host group ID mapped to the volume. type: str host_id: - description: The host ID mapped to the volume. + description: The Host ID mapped to the volume. type: str id: description: The HLU ID. @@ -588,7 +618,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreVolume(object): @@ -601,13 +631,17 @@ def __init__(self): mutually_exclusive = [['vol_name', 'vol_id']] required_one_of = [['vol_name', 'vol_id']] + required_by = { + 'app_type_other': 'app_type', + } # initialize the ansible module self.module = AnsibleModule( argument_spec=self.module_params, supports_check_mode=False, mutually_exclusive=mutually_exclusive, - required_one_of=required_one_of + required_one_of=required_one_of, + required_by=required_by ) LOG.info('HAS_PY4PS = %s , IMPORT_ERROR = %s', HAS_PY4PS, @@ -664,7 +698,9 @@ def create_volume(self, vol_name, volume_group_id, protection_policy_id, performance_policy, - description): + description, + app_type, + app_type_other): """Create PowerStore volume""" try: @@ -681,7 +717,9 @@ def create_volume(self, vol_name, description=description, performance_policy_id=performance_policy, protection_policy_id=protection_policy_id, - volume_group_id=volume_group_id) + volume_group_id=volume_group_id, + app_type=app_type, + app_type_other=app_type_other) return True except Exception as e: msg = 'Create volume {0} failed with error {1}'.format( @@ -695,7 +733,9 @@ def modify_volume(self, vol_id, size, protection_policy_id, performance_policy, - description): + description, + app_type, + app_type_other): """Modify PowerStore volume""" # old_volume_name and name can be same if a new name is not passed # old_volume_name added for logging purpose @@ -716,7 +756,9 @@ def modify_volume(self, vol_id, size=size, description=description, performance_policy_id=performance_policy, - protection_policy_id=protection_policy_id) + protection_policy_id=protection_policy_id, + app_type=app_type, + app_type_other=app_type_other) return True except Exception as e: msg = 'Modify volume {0} failed with error {1}'.format( @@ -928,15 +970,17 @@ def validate_refresh_op_params(self, data): vol_details = self.get_volume(vol_name=data['source_volume']) else: vol_details = self.get_volume(vol_id=data['source_volume']) + if vol_details is None: errormsg = "Source volume does not exist." LOG.error(errormsg) self.module.fail_json(msg=errormsg) - if vol_details['protection_data']['family_id'] != data['volume_family_id']: + elif vol_details['protection_data']['family_id'] != data['volume_family_id']: errormsg = "Source volume does not belong to the family of the current volume." LOG.error(errormsg) self.module.fail_json(msg=errormsg) - data['source_volume_id'] = vol_details['id'] + else: + data['source_volume_id'] = vol_details['id'] return data @@ -1130,6 +1174,8 @@ def perform_module_operation(self): remote_system, self.module.params['remote_appliance_id']) end_metro_config = self.module.params['end_metro_config'] delete_remote_volume = self.module.params['delete_remote_volume'] + app_type = self.module.params['app_type'] + app_type_other = self.module.params['app_type_other'] changed = False is_volume_refreshed = False @@ -1150,6 +1196,11 @@ def perform_module_operation(self): self.module.fail_json(msg="cap_unit can be specified along " "with size. Please enter a valid size.") + if app_type_other is not None and len(app_type_other) > 32: + self.module.fail_json(msg="Max Length for option " + "'app_type_other' is 32. " + "Enter a valid string.") + # Call to create volume if state == 'present' and volume is None: if vol_name is None or len(vol_name.strip()) == 0: @@ -1171,7 +1222,9 @@ def perform_module_operation(self): volume_group_id=volume_group_id, protection_policy_id=protection_policy_id, performance_policy=performance_policy, - description=description) + description=description, + app_type=app_type, + app_type_other=app_type_other) if changed: vol_id = self.get_volume_id_by_name(vol_name) volume = self.get_volume(vol_id=vol_id) @@ -1235,7 +1288,9 @@ def perform_module_operation(self): 'description': description, 'protection_policy_id': protection_policy_id, 'performance_policy_id': performance_policy, - 'size': size + 'size': size, + 'app_type': app_type, + 'app_type_other': app_type_other } # In update_dict parameters which are to be updated will have @@ -1255,7 +1310,9 @@ def perform_module_operation(self): size=update_dict['size'], protection_policy_id=update_dict['protection_policy_id'], performance_policy=update_dict['performance_policy_id'], - description=update_dict['description']) or changed + description=update_dict['description'], + app_type=update_dict['app_type'], + app_type_other=update_dict['app_type_other']) or changed if state == 'present' and volume and mapping_state in [ None, 'unmapped'] and hlu: @@ -1582,7 +1639,8 @@ def check_modify_volume_required(vol, vol_dict2): vol_dict1 = {'name': vol['name'], 'description': vol['description'], 'protection_policy_id': vol['protection_policy_id'], 'performance_policy_id': vol['performance_policy_id'], - 'size': vol['size'] + 'size': vol['size'], 'app_type': vol['app_type'], + 'app_type_other': vol['app_type_other'] } update_dict = {} @@ -1695,7 +1753,32 @@ def get_powerstore_volume_parameters(): remote_system=dict(required=False, type='str'), remote_appliance_id=dict(required=False, type='str'), end_metro_config=dict(required=False, type='bool', default=False), - delete_remote_volume=dict(required=False, type='bool') + delete_remote_volume=dict(required=False, type='bool'), + app_type=dict( + type='str', + choices=["Relational_Databases_Other", + "Relational_Databases_Oracle", + "Relational_Databases_SQL_Server", + "Relational_Databases_PostgreSQL", + "Relational_Databases_MySQL", + "Relational_Databases_IBM_DB2", + "Big_Data_Analytics_Other", "Big_Data_Analytics_MongoDB", + "Big_Data_Analytics_Cassandra", + "Big_Data_Analytics_SAP_HANA", "Big_Data_Analytics_Spark", + "Big_Data_Analytics_Splunk", + "Big_Data_Analytics_ElasticSearch", + "Business_Applications_Other", + "Business_Applications_ERP_SAP", + "Business_Applications_CRM", + "Business_Applications_Exchange", + "Business_Applications_Sharepoint", "Healthcare_Other", + "Healthcare_Epic", "Healthcare_MEDITECH", + "Healthcare_Allscripts", "Healthcare_Cerner", + "Virtualization_Other", + "Virtualization_Virtual_Servers_VSI", + "Virtualization_Containers_Kubernetes", + "Virtualization_Virtual_Desktops_VDI", "Other"]), + app_type_other=dict(type='str') ) diff --git a/plugins/modules/volumegroup.py b/plugins/modules/volumegroup.py index ce8836f..d0b8bfa 100644 --- a/plugins/modules/volumegroup.py +++ b/plugins/modules/volumegroup.py @@ -402,7 +402,7 @@ VERSION_ERROR = py4ps_version['unsupported_version_message'] # Application type -APPLICATION_TYPE = 'Ansible/1.8.0' +APPLICATION_TYPE = 'Ansible/1.9.0' class PowerStoreVolumeGroup(object): diff --git a/tests/requirements.txt b/tests/requirements.txt index 3541acd..4d21184 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -4,4 +4,4 @@ pytest-mock pytest-cov pytest-forked coverage==4.5.4 -mock +mock \ No newline at end of file diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index df78cca..dcfcafd 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,5 +1,11 @@ plugins/modules/remote_support.py compile-2.6 +plugins/modules/vcenter.py compile-2.7 +plugins/modules/vcenter.py compile-3.5 plugins/modules/remote_support.py import-2.6 +plugins/modules/vcenter.py compile-2.6 +plugins/modules/vcenter.py import-2.6 +plugins/modules/vcenter.py import-2.7 +plugins/modules/vcenter.py import-3.5 plugins/modules/certificate.py validate-modules:missing-gplv3-license plugins/modules/cluster.py validate-modules:missing-gplv3-license plugins/modules/dns.py validate-modules:missing-gplv3-license @@ -32,3 +38,4 @@ plugins/modules/snapshotrule.py validate-modules:missing-gplv3-license plugins/modules/volume.py validate-modules:missing-gplv3-license plugins/modules/volumegroup.py validate-modules:missing-gplv3-license plugins/modules/ldap_domain.py validate-modules:missing-gplv3-license +plugins/modules/vcenter.py validate-modules:missing-gplv3-license \ No newline at end of file diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt index 37e8e58..ae3ada3 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.13.txt @@ -1,3 +1,7 @@ +plugins/modules/vcenter.py compile-2.7 +plugins/modules/vcenter.py compile-3.5 +plugins/modules/vcenter.py import-2.7 +plugins/modules/vcenter.py import-3.5 plugins/modules/certificate.py validate-modules:missing-gplv3-license plugins/modules/cluster.py validate-modules:missing-gplv3-license plugins/modules/dns.py validate-modules:missing-gplv3-license @@ -30,3 +34,4 @@ plugins/modules/snapshotrule.py validate-modules:missing-gplv3-license plugins/modules/volume.py validate-modules:missing-gplv3-license plugins/modules/volumegroup.py validate-modules:missing-gplv3-license plugins/modules/ldap_domain.py validate-modules:missing-gplv3-license +plugins/modules/vcenter.py validate-modules:missing-gplv3-license \ No newline at end of file diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt index 37e8e58..ae3ada3 100644 --- a/tests/sanity/ignore-2.14.txt +++ b/tests/sanity/ignore-2.14.txt @@ -1,3 +1,7 @@ +plugins/modules/vcenter.py compile-2.7 +plugins/modules/vcenter.py compile-3.5 +plugins/modules/vcenter.py import-2.7 +plugins/modules/vcenter.py import-3.5 plugins/modules/certificate.py validate-modules:missing-gplv3-license plugins/modules/cluster.py validate-modules:missing-gplv3-license plugins/modules/dns.py validate-modules:missing-gplv3-license @@ -30,3 +34,4 @@ plugins/modules/snapshotrule.py validate-modules:missing-gplv3-license plugins/modules/volume.py validate-modules:missing-gplv3-license plugins/modules/volumegroup.py validate-modules:missing-gplv3-license plugins/modules/ldap_domain.py validate-modules:missing-gplv3-license +plugins/modules/vcenter.py validate-modules:missing-gplv3-license \ No newline at end of file diff --git a/tests/unit/plugins/module_utils/mock_filesystem_api.py b/tests/unit/plugins/module_utils/mock_filesystem_api.py index 565e780..30c1b8b 100644 --- a/tests/unit/plugins/module_utils/mock_filesystem_api.py +++ b/tests/unit/plugins/module_utils/mock_filesystem_api.py @@ -26,7 +26,12 @@ class MockFilesystemApi: "folder_rename_policy": None, "smb_properties": None, "quota_defaults": None, - "state": None + "state": None, + "config_type": None, + "is_async_mtime_enabled": None, + "file_events_publishing_mode": None, + "flr_attributes": None, + "host_io_size": None } FS_NAME = "sample_filesystem" @@ -41,6 +46,8 @@ class MockFilesystemApi: "access_policy_l10n": "UNIX", "access_type": None, "access_type_l10n": None, + "config_type": "General", + "config_type_l10n": "General", "creation_timestamp": None, "creator_type": None, "creator_type_l10n": None, @@ -48,11 +55,27 @@ class MockFilesystemApi: "default_soft_limit": 8589934592, "description": DESCRIPTION1, "expiration_timestamp": None, + "file_events_publishing_mode": None, + "file_events_publishing_mode_l10n": None, "filesystem_type": "Primary", "filesystem_type_l10n": FILESYSTEM_TYPE, + "flr_attributes": { + "auto_delete": False, + "auto_lock": False, + "clock_time": None, + "default_retention": "0D", + "has_protected_files": False, + "maximum_retention": "0D", + "maximum_retention_date": None, + "minimum_retention": "0D", + "mode": "None", + "policy_interval": 0 + }, "folder_rename_policy": "All_Forbidden", "folder_rename_policy_l10n": "All Renames Forbidden", "grace_period": 2592000, + "host_io_size": None, + "host_io_size_l10n": None, "id": "621fb793-5e18-b998-462d-a6cb1f6ffcd6", "is_async_MTime_enabled": False, "is_modified": None, @@ -89,6 +112,8 @@ class MockFilesystemApi: "access_policy_l10n": "Native", "access_type": None, "access_type_l10n": None, + "config_type": "General", + "config_type_l10n": "General", "creation_timestamp": None, "creator_type": None, "creator_type_l10n": None, @@ -96,13 +121,29 @@ class MockFilesystemApi: "default_soft_limit": 2199023255552, "description": None, "expiration_timestamp": None, + "file_events_publishing_mode": True, + "file_events_publishing_mode_l10n": True, "filesystem_type": "Primary", "filesystem_type_l10n": FILESYSTEM_TYPE, + "flr_attributes": { + "auto_delete": False, + "auto_lock": False, + "clock_time": None, + "default_retention": "15D", + "has_protected_files": False, + "maximum_retention": "30D", + "maximum_retention_date": None, + "minimum_retention": "10D", + "mode": "Enterprise", + "policy_interval": 0 + }, "folder_rename_policy": "SMB_Forbidden", "folder_rename_policy_l10n": "Renames via SMB Forbidden", "grace_period": 1209600, + "host_io_size": None, + "host_io_size_l10n": None, "id": "621fb793-5e18-b998-462d-a6cb1f6ffcd6", - "is_async_MTime_enabled": False, + "is_async_MTime_enabled": True, "is_modified": None, "is_quota_enabled": True, "is_smb_no_notify_enabled": False, diff --git a/tests/unit/plugins/module_utils/mock_info_api.py b/tests/unit/plugins/module_utils/mock_info_api.py index 90a80ff..efc9651 100644 --- a/tests/unit/plugins/module_utils/mock_info_api.py +++ b/tests/unit/plugins/module_utils/mock_info_api.py @@ -46,93 +46,85 @@ class MockInfoApi: @staticmethod def get_security_config_response(response_type): - if response_type == 'api': - return [ - { - "id": "1" - } - ] + return [ + { + "id": "1" + } + ] @staticmethod def get_certificate_response(response_type): - if response_type == 'api': - return [ - { - "id": "e940144f-393f-4e9c-8f54-9a4d57b38c48" - }, - { - "id": "4b6a46bc-b22c-47d8-b094-9a4dc1c6877d" - }, - { - "id": "37b76535-612b-456a-a694-1389f17632c7" - }, - { - "id": "e00b93aa-3a11-4242-9576-e18c0052c069" - }, - { - "id": "373dbe54-150f-47b9-8ce2-261307d05ebc" - }, - { - "id": "cedeb3ed-0203-405b-b6c0-b3117a331704" - } - ] + return [ + { + "id": "e940144f-393f-4e9c-8f54-9a4d57b38c48" + }, + { + "id": "4b6a46bc-b22c-47d8-b094-9a4dc1c6877d" + }, + { + "id": "37b76535-612b-456a-a694-1389f17632c7" + }, + { + "id": "e00b93aa-3a11-4242-9576-e18c0052c069" + }, + { + "id": "373dbe54-150f-47b9-8ce2-261307d05ebc" + }, + { + "id": "cedeb3ed-0203-405b-b6c0-b3117a331704" + } + ] @staticmethod def get_dns_response(response_type): - if response_type == 'api': - return [ - { - "id": "DNS1" - } - ] + return [ + { + "id": "DNS1" + } + ] @staticmethod def get_ntp_response(response_type): - if response_type == 'api': - return [ - { - "id": "NTP1" - } - ] + return [ + { + "id": "NTP1" + } + ] @staticmethod def get_one_id_response(response_type): - if response_type == 'api': - return [ - { - "id": "0" - } - ] + return [ + { + "id": "0" + } + ] @staticmethod def get_email_destination_response(response_type): - if response_type == 'api': - return [ - { - "id": "9c3e5cba-17d5-4d64-b97c-350f91e2b714" - } - ] + return [ + { + "id": "9c3e5cba-17d5-4d64-b97c-350f91e2b714" + } + ] @staticmethod def get_remote_support_contact_response(response_type): - if response_type == 'api': - return [ - { - "id": "0" - }, - { - "id": "1" - } - ] + return [ + { + "id": "0" + }, + { + "id": "1" + } + ] @staticmethod def get_remote_support_response(response_type): - if response_type == 'api': - return [ - { - "id": "0" - } - ] + return [ + { + "id": "10" + } + ] @staticmethod def get_volumes_failed_msg(): diff --git a/tests/unit/plugins/module_utils/mock_vcenter_api.py b/tests/unit/plugins/module_utils/mock_vcenter_api.py new file mode 100644 index 0000000..5282361 --- /dev/null +++ b/tests/unit/plugins/module_utils/mock_vcenter_api.py @@ -0,0 +1,80 @@ +# Copyright: (c) 2023, Dell Technologies + +# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) + +"""Mock Api response for Unit tests of vCenter module for PowerStore""" + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + + +class MockVCenterApi: + MODULE_UTILS_PATH = 'ansible_collections.dellemc.powerstore.plugins.module_utils.storage.dell.utils' + SAMPLE_ADDRESS = "xx.xx.xx.xx" + SAMPLE_ADDRESS1 = "xx.xx.xx.xy" + USERNAME_1 = "user_1" + USERNAME_2 = "user_2" + PASS_STR = "vCenter_pass" + ID_1 = "434f534e-7009-4e60-8e1e-5cf721ae40df" + + VCENTER_COMMON_ARGS = { + 'array_ip': '**.***.**.***', + 'vcenter_id': None, + 'address': None, + 'vcenter_username': None, + 'vcenter_password': None, + 'vasa_provider_credentials': None, + 'delete_vasa_provider': None, + 'update_password': None, + 'state': None + } + + VCENTER_DETAILS_1 = { + "id": ID_1, + "instance_uuid": ID_1, + "address": SAMPLE_ADDRESS, + "username": USERNAME_1, + "version": "7.0.3", + "vendor_provider_status": "Not_Registered", + "vendor_provider_status_l10n": "Not Registered", + "virtual_machines": [], + "datastores": [], + "vsphere_hosts": [] + } + + VCENTER_DETAILS_2 = [{ + "id": ID_1, + "instance_uuid": ID_1, + "address": SAMPLE_ADDRESS1, + "username": USERNAME_2, + "version": "7.0.3", + "vendor_provider_status": "Online", + "vendor_provider_status_l10n": "Online", + "virtual_machines": [], + "datastores": [], + "vsphere_hosts": [] + }] + + @staticmethod + def invalid_param_failed_msg(): + return "Provide the valid address" + + @staticmethod + def add_vcenter_without_param_failed_msg(): + return "address, vcenter_username and vcenter_password must be " \ + "passed to add a vCenter" + + @staticmethod + def get_vcenter_exception_failed_msg(): + return "Get details of vCenter: %s failed with " \ + "error" % MockVCenterApi.ID_1 + + @staticmethod + def modify_vcenter_exception_failed_msg(): + return "Modification of vCenter %s failed with error" % \ + MockVCenterApi.ID_1 + + @staticmethod + def remove_vcenter_exception_failed_msg(): + return "Deletion of vCenter %s failed with error" % MockVCenterApi.ID_1 diff --git a/tests/unit/plugins/module_utils/mock_volume_api.py b/tests/unit/plugins/module_utils/mock_volume_api.py index 410e2cc..8145728 100644 --- a/tests/unit/plugins/module_utils/mock_volume_api.py +++ b/tests/unit/plugins/module_utils/mock_volume_api.py @@ -37,7 +37,9 @@ class MockVolumeApi: 'remote_appliance_id': None, 'end_metro_config': None, 'delete_remote_volume': None, - 'state': None + 'state': None, + 'app_type': None, + 'app_type_other': None } DESCRIPTION1 = 'Volume created' @@ -126,6 +128,8 @@ class MockVolumeApi: VOL_DETAILS1 = [ { + "app_type": "Relational_Databases_Other", + "app_type_other": "Max_DB", "appliance_id": "A1", "description": DESCRIPTION1, "hlu_details": [], @@ -189,6 +193,8 @@ class MockVolumeApi: MODIFY_VOL_DETAILS1 = [ { + "app_type": None, + "app_type_other": None, "appliance_id": "A1", "description": DESCRIPTION1, "hlu_details": [ @@ -267,6 +273,8 @@ class MockVolumeApi: VOL_DETAILS2 = [ { + "app_type": "Business_Applications_CRM", + "app_type_other": None, "appliance_id": "A1", "description": "Volume 2 created", "hlu_details": [], @@ -315,6 +323,8 @@ class MockVolumeApi: TWO_VOL_LIST = [ { + "app_type": None, + "app_type_other": None, "appliance_id": "A1", "description": DESCRIPTION1, "hlu_details": [], @@ -359,6 +369,8 @@ class MockVolumeApi: "wwn": WWN_1 }, { + "app_type": None, + "app_type_other": None, "appliance_id": "A1", "description": "Volume 2 created", "hlu_details": [], diff --git a/tests/unit/plugins/modules/test_filesystem.py b/tests/unit/plugins/modules/test_filesystem.py index 1f185f3..04b6fc9 100644 --- a/tests/unit/plugins/modules/test_filesystem.py +++ b/tests/unit/plugins/modules/test_filesystem.py @@ -84,6 +84,23 @@ def test_get_filesystem_with_exception(self, filesystem_module_mock): filesystem_module_mock.perform_module_operation() filesystem_module_mock.provisioning.get_filesystem_by_name.assert_called() + def test_get_filesystem_no_nas_exception(self, filesystem_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "404" + self.get_module_args.update({ + "filesystem_name": 'sample_filesystem', + "nas_server": MockFilesystemApi.NAS_ID, + "state": 'present' + }) + filesystem_module_mock.module.params = self.get_module_args + filesystem_module_mock.provisioning.get_nas_server_details = MagicMock( + return_value=None) + filesystem_module_mock.provisioning.get_filesystem_by_name = MagicMock( + side_effect=MockApiException) + filesystem_module_mock.perform_module_operation() + filesystem_module_mock.provisioning.get_nas_server_details.assert_called() + def test_get_nas_for_filesystem_with_exception(self, filesystem_module_mock): MockApiException.HTTP_ERR = "1" MockApiException.err_code = "1" @@ -114,7 +131,11 @@ def test_create_filesystem(self, filesystem_module_mock): "is_smb_op_locks_enabled": True, "is_smb_no_notify_enabled": True, "smb_notify_on_change_dir_depth": 1, "is_smb_sync_writes_enabled": True}, "quota_defaults": {"grace_period": 1, "grace_period_unit": "months", - "default_hard_limit": 10, "default_soft_limit": 8}, + "default_hard_limit": 10, "default_soft_limit": 8, "cap_unit": None}, + "config_type": "General", + "is_async_mtime_enabled": True, + "flr_attributes": {"mode": "Enterprise", "minimum_retention": "5D", "maximum_retention": "10D", "default_retention": "7D"}, + "file_events_publishing_mode": True, "state": 'present' }) filesystem_module_mock.module.params = self.get_module_args @@ -245,6 +266,9 @@ def test_modify_filesystem(self, filesystem_module_mock): "smb_notify_on_change_dir_depth": 3, "is_smb_sync_writes_enabled": False}, "quota_defaults": {"grace_period": 2, "grace_period_unit": "weeks", "default_hard_limit": 3, "default_soft_limit": 2, "cap_unit": "TB"}, + "is_async_mtime_enabled": True, + "flr_attributes": {"minimum_retention": "10D", "maximum_retention": "30D", "default_retention": "15D"}, + "file_events_publishing_mode": True, "state": 'present' }) filesystem_module_mock.module.params = self.get_module_args @@ -303,6 +327,27 @@ def test_modify_grace_period_to_months_filesystem(self, filesystem_module_mock): assert filesystem_module_mock.module.exit_json.call_args[1]['changed'] is True filesystem_module_mock.provisioning.modify_filesystem.assert_called() + def test_modify_filesystem_wo_grace_period_unit_wo_cap_unit(self, filesystem_module_mock): + self.get_module_args.update({ + "filesystem_name": MockFilesystemApi.FS_NAME, + "nas_server": MockFilesystemApi.NAS_ID, + "quota_defaults": {"grace_period": 5, "grace_period_unit": None, + "default_hard_limit": 3, "default_soft_limit": 2, "cap_unit": None}, + "state": 'present' + }) + filesystem_module_mock.module.params = self.get_module_args + filesystem_module_mock.provisioning.get_nas_server_details = MagicMock( + return_value=MockFilesystemApi.NAS_SERVER_DETAILS[0]) + filesystem_module_mock.provisioning.get_filesystem_by_name = MagicMock( + return_value=MockFilesystemApi.MODIFY_FS_DETAILS) + filesystem_module_mock.provisioning.modify_filesystem = MagicMock( + return_value=None) + filesystem_module_mock.provisioning.get_filesystem_details = MagicMock( + return_value=MockFilesystemApi.FS_DETAILS_1[0]) + filesystem_module_mock.perform_module_operation() + assert filesystem_module_mock.module.exit_json.call_args[1]['changed'] is True + filesystem_module_mock.provisioning.modify_filesystem.assert_called() + def test_modify_filesystem_with_exception(self, filesystem_module_mock): MockApiException.HTTP_ERR = "1" MockApiException.err_code = "1" @@ -325,6 +370,28 @@ def test_modify_filesystem_with_exception(self, filesystem_module_mock): filesystem_module_mock.perform_module_operation() filesystem_module_mock.provisioning.modify_filesystem.assert_called() + def test_modify_filesystem_with_invalid_default_hard_limit(self, filesystem_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "400" + self.get_module_args.update({ + "filesystem_name": MockFilesystemApi.FS_NAME, + "nas_server": MockFilesystemApi.NAS_ID, + "size": 4, + "quota_defaults": {"grace_period": 2, "grace_period_unit": "days", + "default_hard_limit": -1, "default_soft_limit": 2, "cap_unit": "GB"}, + "state": 'present' + }) + filesystem_module_mock.module.params = self.get_module_args + filesystem_module_mock.provisioning.get_nas_server_details = MagicMock( + return_value=MockFilesystemApi.NAS_SERVER_DETAILS[0]) + filesystem_module_mock.provisioning.get_filesystem_by_name = MagicMock( + return_value=MockFilesystemApi.MODIFY_FS_DETAILS) + filesystem_module_mock.provisioning.modify_filesystem = MagicMock( + side_effect=MockApiException) + filesystem_module_mock.perform_module_operation() + filesystem_module_mock.provisioning.modify_filesystem.assert_called() + def test_delete_filesystem(self, filesystem_module_mock): self.get_module_args.update({ "filesystem_id": MockFilesystemApi.FS_ID, diff --git a/tests/unit/plugins/modules/test_info.py b/tests/unit/plugins/modules/test_info.py index 5002479..6fd2052 100644 --- a/tests/unit/plugins/modules/test_info.py +++ b/tests/unit/plugins/modules/test_info.py @@ -37,7 +37,6 @@ def info_module_mock(self, mocker): return info_module_mock def test_get_security_config_response(self, info_module_mock): - MockInfoApi.get_security_config_response('api') self.get_module_args.update({ 'gather_subset': ['security_config'], 'filters': None, @@ -48,7 +47,6 @@ def test_get_security_config_response(self, info_module_mock): info_module_mock.configuration.get_security_configs.assert_called() def test_get_certificate_response(self, info_module_mock): - MockInfoApi.get_certificate_response('api') self.get_module_args.update({ 'gather_subset': ['certificate'], 'filters': None, @@ -59,7 +57,6 @@ def test_get_certificate_response(self, info_module_mock): info_module_mock.configuration.get_certificates.assert_called() def test_get_ad_response(self, info_module_mock): - MockInfoApi.get_certificate_response('api') self.get_module_args.update({ 'gather_subset': ['ad'], 'filters': None, @@ -70,7 +67,6 @@ def test_get_ad_response(self, info_module_mock): info_module_mock.provisioning.get_file_ads.assert_called() def test_get_ldap_response(self, info_module_mock): - MockInfoApi.get_certificate_response('api') self.get_module_args.update({ 'gather_subset': ['ldap'], 'filters': None, @@ -92,7 +88,6 @@ def test_get_dns_response(self, info_module_mock): info_module_mock.configuration.get_dns_list.assert_called() def test_get_ntp_response(self, info_module_mock): - MockInfoApi.get_ntp_response('api') self.get_module_args.update({ 'gather_subset': ['ntp'], 'filters': None, @@ -103,7 +98,6 @@ def test_get_ntp_response(self, info_module_mock): info_module_mock.configuration.get_ntp_list.assert_called() def test_get_smtp_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['smtp_config'], 'filters': None, @@ -114,7 +108,6 @@ def test_get_smtp_response(self, info_module_mock): info_module_mock.configuration.get_smtp_configs.assert_called() def test_get_email_destination_response(self, info_module_mock): - MockInfoApi.get_email_destination_response('api') self.get_module_args.update({ 'gather_subset': ['email_notification'], 'filters': None, @@ -125,7 +118,6 @@ def test_get_email_destination_response(self, info_module_mock): info_module_mock.configuration.get_destination_emails.assert_called() def test_get_remote_support_contact_response(self, info_module_mock): - MockInfoApi.get_remote_support_contact_response('api') self.get_module_args.update({ 'gather_subset': ['remote_support_contact'], 'filters': None, @@ -136,7 +128,6 @@ def test_get_remote_support_contact_response(self, info_module_mock): info_module_mock.configuration.get_remote_support_contact_list.assert_called() def test_get_remote_support_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['remote_support'], 'filters': None, @@ -147,7 +138,6 @@ def test_get_remote_support_response(self, info_module_mock): info_module_mock.configuration.get_remote_support_list.assert_called() def test_get_filesystem_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['file_system'], 'filters': None, @@ -158,7 +148,6 @@ def test_get_filesystem_response(self, info_module_mock): info_module_mock.conn.provisioning.get_file_systems.assert_called() def test_get_role_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['role'], 'filters': None, @@ -169,7 +158,6 @@ def test_get_role_response(self, info_module_mock): info_module_mock.configuration.get_roles.assert_called() def test_get_response_invalid_gather_subset(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['roles'], 'filters': None, @@ -181,7 +169,6 @@ def test_get_response_invalid_gather_subset(self, info_module_mock): info_module_mock.module.fail_json.call_args[1]['msg'] def test_get_role_multiple_cluster_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['role'], 'filters': None, @@ -224,7 +211,6 @@ def test_get_role_get_empty_subset_exception(self, info_module_mock): info_module_mock.module.fail_json.call_args[1]['msg'] def test_get_filesystem_snapshot_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['file_system'], 'filters': [{ @@ -239,7 +225,6 @@ def test_get_filesystem_snapshot_response(self, info_module_mock): info_module_mock.conn.provisioning.get_file_systems.assert_called() def test_get_filesystem_invalid_filter_key_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['file_system'], 'filters': [{ @@ -256,7 +241,6 @@ def test_get_filesystem_invalid_filter_key_response(self, info_module_mock): info_module_mock.module.fail_json.call_args[1]['msg'] def test_get_volume_multiple_filter_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['vol'], 'filters': [ @@ -276,7 +260,6 @@ def test_get_volume_multiple_filter_response(self, info_module_mock): info_module_mock.conn.provisioning.get_volumes.assert_called() def test_get_volume_invalid_valid_filter_response(self, info_module_mock): - MockInfoApi.get_one_id_response('api') self.get_module_args.update({ 'gather_subset': ['vol'], 'filters': [ @@ -293,6 +276,25 @@ def test_get_volume_invalid_valid_filter_response(self, info_module_mock): }) info_module_mock.module.params = self.get_module_args info_module_mock.perform_module_operation() - print(info_module_mock.module.fail_json.call_args[1]['msg']) assert MockInfoApi.get_volumes_failed_msg() in \ info_module_mock.module.fail_json.call_args[1]['msg'] + + def test_get_vcenter_response(self, info_module_mock): + self.get_module_args.update({ + 'gather_subset': ['vcenter'], + 'filters': None, + 'all_pages': None + }) + info_module_mock.module.params = self.get_module_args + info_module_mock.perform_module_operation() + info_module_mock.configuration.get_vcenters.assert_called() + + def test_get_virtual_volume_response(self, info_module_mock): + self.get_module_args.update({ + 'gather_subset': ['virtual_volume'], + 'filters': None, + 'all_pages': None + }) + info_module_mock.module.params = self.get_module_args + info_module_mock.perform_module_operation() + info_module_mock.configuration.get_virtual_volume_list.assert_called() diff --git a/tests/unit/plugins/modules/test_vcenter.py b/tests/unit/plugins/modules/test_vcenter.py new file mode 100644 index 0000000..dc6d20c --- /dev/null +++ b/tests/unit/plugins/modules/test_vcenter.py @@ -0,0 +1,209 @@ +# Copyright: (c) 2023, Dell Technologies + +# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) + +"""Unit Tests for vCenter module for PowerStore""" + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type +import pytest +from mock.mock import MagicMock +from ansible_collections.dellemc.powerstore.tests.unit.plugins.module_utils.mock_vcenter_api import MockVCenterApi +from ansible_collections.dellemc.powerstore.tests.unit.plugins.module_utils.mock_sdk_response \ + import MockSDKResponse +from ansible_collections.dellemc.powerstore.tests.unit.plugins.module_utils.mock_api_exception \ + import MockApiException +from ansible_collections.dellemc.powerstore.plugins.module_utils.storage.dell \ + import utils + +utils.get_logger = MagicMock() +utils.get_powerstore_connection = MagicMock() +utils.PowerStoreException = MagicMock() +from ansible.module_utils import basic +basic.AnsibleModule = MagicMock() +from ansible_collections.dellemc.powerstore.plugins.modules.vcenter import PowerstoreVCenter + + +class TestPowerstoreVolume(): + get_module_args = MockVCenterApi.VCENTER_COMMON_ARGS + + @pytest.fixture + def vcenter_module_mock(self, mocker): + mocker.patch(MockVCenterApi.MODULE_UTILS_PATH + '.PowerStoreException', + new=MockApiException) + vcenter_module_mock = PowerstoreVCenter() + vcenter_module_mock.module = MagicMock() + vcenter_module_mock.module.check_mode = False + return vcenter_module_mock + + def test_get_vcenter_by_id(self, vcenter_module_mock): + self.get_module_args.update({ + 'vcenter_id': MockVCenterApi.ID_1 + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + return_value=MockVCenterApi.VCENTER_DETAILS_1) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.get_vcenter_details.assert_called() + assert self.get_module_args['vcenter_id'] == \ + vcenter_module_mock.module.exit_json.call_args[ + 1]['vcenter_details']['id'] + + def before_modify_vcenter(self, vcenter_module_mock): + self.get_module_args.update({ + "vcenter_id": MockVCenterApi.ID_1, + "address": MockVCenterApi.SAMPLE_ADDRESS1, + "vcenter_username": MockVCenterApi.USERNAME_2, + "vcenter_password": MockVCenterApi.PASS_STR, + "update_password": "always", + "vasa_provider_credentials": { + "username": MockVCenterApi.USERNAME_1, + "password": MockVCenterApi.PASS_STR + }, + "state": "present" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + return_value=MockVCenterApi.VCENTER_DETAILS_1) + + def test_add_vcenter(self, vcenter_module_mock): + self.get_module_args.update({ + "address": MockVCenterApi.SAMPLE_ADDRESS, + "vcenter_username": MockVCenterApi.USERNAME_1, + "vcenter_password": MockVCenterApi.PASS_STR, + "vasa_provider_credentials": { + "username": MockVCenterApi.USERNAME_1, + "password": MockVCenterApi.PASS_STR + }, + "state": "present" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + return_value=None) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.add_vcenter.assert_called() + assert vcenter_module_mock.module.exit_json.call_args[1]['changed'] \ + is True + + def test_modify_vcenter(self, vcenter_module_mock): + self.before_modify_vcenter(vcenter_module_mock) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.modify_vcenter.assert_called() + assert vcenter_module_mock.module.exit_json.call_args[1]['changed'] \ + is True + + def test_modify_vcenter_exception(self, vcenter_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "400" + self.before_modify_vcenter(vcenter_module_mock) + vcenter_module_mock.configuration.modify_vcenter = MagicMock( + side_effect=MockApiException) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.modify_vcenter.assert_called() + assert MockVCenterApi.modify_vcenter_exception_failed_msg() in \ + vcenter_module_mock.module.fail_json.call_args[1]['msg'] + + def test_remove_vcenter(self, vcenter_module_mock): + self.get_module_args.update({ + "vcenter_id": MockVCenterApi.ID_1, + "delete_vasa_provider": True, + "state": "absent" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + return_value=MockVCenterApi.VCENTER_DETAILS_2[0]) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.remove_vcenter.assert_called() + assert vcenter_module_mock.module.exit_json.call_args[1]['changed'] \ + is True + + def test_remove_vcenter_exception(self, vcenter_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "400" + self.get_module_args.update({ + "vcenter_id": MockVCenterApi.ID_1, + "delete_vasa_provider": True, + "state": "absent" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + return_value=MockVCenterApi.VCENTER_DETAILS_2[0]) + vcenter_module_mock.configuration.remove_vcenter = MagicMock( + side_effect=MockApiException) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.remove_vcenter.assert_called() + assert MockVCenterApi.remove_vcenter_exception_failed_msg() in \ + vcenter_module_mock.module.fail_json.call_args[1]['msg'] + + def test_add_vcenter_with_empty_param(self, vcenter_module_mock): + self.get_module_args.update({ + "address": " x . y", + "vcenter_username": MockVCenterApi.USERNAME_2, + "vcenter_password": MockVCenterApi.PASS_STR, + "state": "present" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.perform_module_operation() + assert MockVCenterApi.invalid_param_failed_msg() in \ + vcenter_module_mock.module.fail_json.call_args[1]['msg'] + + def test_add_vcenter_without_param(self, vcenter_module_mock): + self.get_module_args.update({ + "address": MockVCenterApi.SAMPLE_ADDRESS1, + "state": "present" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.perform_module_operation() + assert MockVCenterApi.add_vcenter_without_param_failed_msg() in \ + vcenter_module_mock.module.fail_json.call_args[1]['msg'] + + def test_get_vcenter_by_id_exception(self, vcenter_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "400" + self.get_module_args.update({ + 'vcenter_id': MockVCenterApi.ID_1 + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + side_effect=MockApiException) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.get_vcenter_details.assert_called() + assert MockVCenterApi.get_vcenter_exception_failed_msg() in \ + vcenter_module_mock.module.fail_json.call_args[1]['msg'] + + def test_get_vcenter_by_id_not_found_exception(self, vcenter_module_mock): + MockApiException.HTTP_ERR = "1" + MockApiException.err_code = "1" + MockApiException.status_code = "404" + self.get_module_args.update({ + 'vcenter_id': MockVCenterApi.ID_1 + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenter_details = MagicMock( + side_effect=MockApiException) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.get_vcenter_details.assert_called() + + def test_add_vcenter_idempotency(self, vcenter_module_mock): + self.get_module_args.update({ + "address": MockVCenterApi.SAMPLE_ADDRESS1, + "vcenter_username": MockVCenterApi.USERNAME_2, + "vcenter_password": MockVCenterApi.PASS_STR, + "update_password": "on_create", + "vasa_provider_credentials": { + "username": MockVCenterApi.USERNAME_1, + "password": MockVCenterApi.PASS_STR + }, + "state": "present" + }) + vcenter_module_mock.module.params = self.get_module_args + vcenter_module_mock.configuration.get_vcenters = MagicMock( + return_value=MockVCenterApi.VCENTER_DETAILS_2) + vcenter_module_mock.perform_module_operation() + vcenter_module_mock.configuration.get_vcenters.assert_called() + assert vcenter_module_mock.module.exit_json.call_args[1]['changed'] \ + is False diff --git a/tests/unit/plugins/modules/test_volume.py b/tests/unit/plugins/modules/test_volume.py index 3ce5b69..9526bf7 100644 --- a/tests/unit/plugins/modules/test_volume.py +++ b/tests/unit/plugins/modules/test_volume.py @@ -99,7 +99,9 @@ def test_create_volume(self, volume_module_mock): 'performance_policy': 'medium', 'vg_name': 'sample_VG', 'protection_policy': 'sample_protection_policy', - 'state': 'present' + 'state': 'present', + 'app_type': 'Relational_Databases_Other', + 'app_type_other': 'Max_DB' }) volume_module_mock.module.params = self.get_module_args volume_module_mock.provisioning.get_volume_by_name = MagicMock( @@ -185,7 +187,8 @@ def test_modify_volume(self, volume_module_mock): 'protection_policy': '', 'size': 2, 'performance_policy': 'high', - 'state': "present" + 'state': "present", + 'app_type': 'Business_Applications_CRM' }) volume_module_mock.module.params = self.get_module_args volume_module_mock.provisioning.get_volume_by_name = MagicMock(