diff options
Diffstat (limited to 'ansible_collections/dellemc/unity/docs')
29 files changed, 7881 insertions, 0 deletions
diff --git a/ansible_collections/dellemc/unity/docs/ADOPTERS.md b/ansible_collections/dellemc/unity/docs/ADOPTERS.md new file mode 100644 index 000000000..826b5cd78 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/ADOPTERS.md @@ -0,0 +1,11 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# List of adopters diff --git a/ansible_collections/dellemc/unity/docs/BRANCHING.md b/ansible_collections/dellemc/unity/docs/BRANCHING.md new file mode 100644 index 000000000..810a309bb --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/BRANCHING.md @@ -0,0 +1,32 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Branching strategy + +Ansible modules for Dell Unity follows a scaled trunk branching strategy where short-lived branches are created off of the main branch. When coding is complete, the branch is merged back into main after being approved in a pull request code review. + +## Branch naming convention + +| Branch Type | Example | Comment | +|--------------|-----------------------------------|-------------------------------------------| +| main | main | | +| Release | release-1.0 | hotfix: release-1.1 patch: release-1.0.1 | +| Feature | feature-9-vol-support | "9" referring to GitHub issue ID | +| Bug Fix | bugfix-110-fix-duplicates-issue | "110" referring to GitHub issue ID | + + +## Steps for working on a release branch + +1. Fork the repository. +2. Create a branch off of the main branch. The branch name should follow [branch naming convention](#branch-naming-convention). +3. Make your changes and commit them to your branch. +4. If other code changes have merged into the upstream main branch, perform a rebase of those changes into your branch. +5. Open a [pull request](https://github.com/dell/ansible-unity/pulls) between your branch and the upstream main branch. +6. Once your pull request has merged, your branch can be deleted. diff --git a/ansible_collections/dellemc/unity/docs/CODE_OF_CONDUCT.md b/ansible_collections/dellemc/unity/docs/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c791055c2 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,137 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Code of conduct - contributor covenant + +## Our pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at ansible.team@dell.com +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary ban + +**Community impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent ban + +**Community impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/ansible_collections/dellemc/unity/docs/COMMITTER_GUIDE.md b/ansible_collections/dellemc/unity/docs/COMMITTER_GUIDE.md new file mode 100644 index 000000000..8af0752e8 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/COMMITTER_GUIDE.md @@ -0,0 +1,49 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Committer guidelines + +These are the guidelines for people with commit privileges on the GitHub repository. Committers act as members of the Core Team and not necessarily employees of Dell. + +These guidelines apply to everyone and as Committers you have been given access to commit changes because you exhibit good judgment and have demonstrated your commitment to the vision of the project. We trust that you will use these privileges wisely and not abuse it. + +If these privileges are abused in any way and the quality of the project is compromised, our trust will be diminished and you may be asked to not commit or lose these privileges all together. + +## General rules + +### Don't + +* Break the build. +* Commit directly. +* Compromise backward compatibility. +* Disrespect your Community Team members. Help them grow. +* Think it is someone elses job to test your code. Write tests for all the code you produce. +* Forget to keep thing simple. +* Create technical debt. Fix-in-place and make it the highest priority above everything else. + +### Do + +* Keep it simple. +* Good work, your best every time. +* Keep the design of your software clean and maintainable. +* Squash your commits, avoid merges. +* Be active. Committers that are not active may have their permissions suspended. +* Write tests for all your deliverables. +* Automate everything. +* Maintain a high code coverage. +* Keep an open communication with other Committers. +* Ask questions. +* Document your contributions and remember to keep it simple. + +## People + +| Name | GitHub ID | Nickname | +|-------|-------------|------------| +| | | | diff --git a/ansible_collections/dellemc/unity/docs/CONTRIBUTING.md b/ansible_collections/dellemc/unity/docs/CONTRIBUTING.md new file mode 100644 index 000000000..1cf25a511 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/CONTRIBUTING.md @@ -0,0 +1,173 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# 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-unity/blob/1.6.0/docs/CODE_OF_CONDUCT.md). + +## Table of contents + +* [Become a contributor](#Become-a-contributor) +* [Submitting issues](#Submitting-issues) +* [Triage issues](#Triage-issues) +* [Your first contribution](#Your-first-contribution) +* [Branching](#Branching) +* [Signing your commits](#Signing-your-commits) +* [Pull requests](#Pull-requests) +* [Code reviews](#Code-reviews) +* [TODOs in the code](#TODOs-in-the-code) + +## Become a contributor + +You can contribute to this project in several ways. Here are some examples: + +* Contribute to the Ansible modules for Dell Unity documentation and codebase. +* Report and triage bugs. +* Feature requests. +* Write technical documentation and blog posts, for users and contributors. +* Help others by answering questions about this project. + +## Submitting issues + +All issues related to Ansible modules for Dell Unity, regardless of the service/repository the issue belongs to (see table above), should be submitted [here](https://github.com/dell/ansible-unity/issues). Issues will be triaged and labels will be used to indicate the type of issue. This section outlines the types of issues that can be submitted. + +### Report bugs + +We aim to track and document everything related to Ansible modules for Dell Unity via the Issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process. + +Before submitting a new issue, make sure someone hasn't already reported the problem. Look through the [existing issues](https://github.com/dell/ansible-unity/issues) for similar issues. + +Report a bug by submitting a [bug report](https://github.com/dell/ansible-unity/issues/new?labels=type%2Fbug%2C+needs-triage&template=bug_report.md&title=%5BBUG%5D%3A). Make sure that you provide as much information as possible on how to reproduce the bug. + +When opening a Bug please include this information to help with debugging: + +1. Version of relevant software: this software, Ansible, Python, SDK, etc. +2. Details of the issue explaining the problem: what, when, where +3. The expected outcome that was not met (if any) +4. Supporting troubleshooting information. __Note: Do not provide private company information that could compromise your company's security.__ + +An Issue __must__ be created before submitting any pull request. Any pull request that is created should be linked to an Issue. + +### Feature request + +If you have an idea of how to improve this project, submit a [feature request](https://github.com/dell/ansible-unity/issues/new?labels=type%2Ffeature-request%2C+needs-triage&template=feature_request.md&title=%5BFEATURE%5D%3A). + +### Answering questions + +If you have a question and you can't find the answer in the documentation or issues, the next step is to submit a [question.](https://github.com/dell/ansible-unity/issues/new?labels=type%2Fquestion&template=ask-a-question.md&title=%5BQUESTION%5D%3A) + +We'd love your help answering questions being asked by other Ansible modules for Dell Unity users. + +## Triage issues + +Triage helps ensure that issues resolve quickly by: + +* Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took. +* Giving a contributor the information they need before they commit to resolving an issue. +* Lowering the issue count by preventing duplicate issues. +* Streamlining the development process by preventing duplicate discussions. + +If you don't have the knowledge or time to code, consider helping with _issue triage_. The Ansible modules for Dell Unity 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-unity/blob/1.6.0/docs/ISSUE_TRIAGE.md). + +## Your first contribution + +Unsure where to begin contributing? Start by browsing issues labeled `beginner friendly` or `help wanted`. + +* [Beginner-friendly](https://github.com/dell/ansible-unity/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22) issues are generally straightforward to complete. +* [Help wanted](https://github.com/dell/ansible-unity/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues are problems we would like the community to help us with regardless of complexity. + +When you're ready to contribute, it's time to create a pull request. + +## Branching + +* [Branching Strategy for Ansible modules for Dell Unity](https://github.com/dell/ansible-unity/blob/1.6.0/docs/BRANCHING.md) + +## Signing your commits + +We require that developers sign off their commits to certify that they have permission to contribute the code in a pull request. This way of certifying is commonly known as the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). We encourage all contributors to read the DCO text before signing a commit and making contributions. + +GitHub will prevent a pull request from being merged if there are any unsigned commits. + +### Signing a commit + +GPG (GNU Privacy Guard) will be used to sign commits. Follow the instructions [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/signing-commits) to create a GPG key and configure your GitHub account to use that key. + +Make sure you have your user name and e-mail set. This will be required for your signed commit to be properly verified. Check this references: + +* Setting up your github user name [reference](https://help.github.com/articles/setting-your-username-in-git/) +* Setting up your e-mail address [reference](https://help.github.com/articles/setting-your-commit-email-address-in-git/) + +Once Git and your GitHub account have been properly configured, you can add the -S flag to the git commits: + +```console +$ git commit -S -m your commit message +# Creates a signed commit +``` + +### Commit message format + +Ansible modules for Dell Unity uses the guidelines for commit messages outlined in [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) + +## Pull requests + +If this is your first time contributing to an open-source project on GitHub, make sure you read about [Creating a pull request](https://help.github.com/en/articles/creating-a-pull-request). + +A pull request must always link to at least one GitHub issue. If that is not the case, create a GitHub issue and link it. + +To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines: + +* Title and description matches the implementation. +* Commits within the pull request follow the formatting guidelines. +* The pull request closes one related issue. +* The pull request contains necessary tests that verify the intended behavior. +* If your pull request has conflicts, rebase your branch onto the main branch. + +If the pull request fixes a bug: + +* The pull request description must include `Fixes #<issue number>`. +* To avoid regressions, the pull request should include tests that replicate the fixed bug. + +The team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body. + +We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible. + +Make sure that the title for your pull request uses the same format as the subject line in the commit message. + +### 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-unity/blob/1.6.0/docs/SUPPORT.md). + +#### Code sanitization + +[GitHub action](https://github.com/dell/ansible-unity/actions/workflows/ansible-test.yml) that analyzes source code to flag ansible sanity errors and runs Unit tests. + +## Code reviews + +All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. + +A pull request must satisfy following for it to be merged: + +* A pull request will require at least 2 maintainer approvals. +* Maintainers must perform a review to ensure the changes adhere to guidelines laid out in this document. +* If any commits are made after the PR has been approved, the PR approval will automatically be removed and the above process must happen again. + +## Code style + +Ensure the added code has the required documenation, examples and unit tests. + +### Sanity + +Run ansible-test sanity --docker default on your code to ensure sanity. Ensure the code does not have any Andersson script violations and not break any existing unit test workflows. + +### TODOs in the code + +We don't like TODOs in the code or documentation. It is really best if you sort out all issues you can see with the changes before we check the changes in. diff --git a/ansible_collections/dellemc/unity/docs/INSTALLATION.md b/ansible_collections/dellemc/unity/docs/INSTALLATION.md new file mode 100644 index 000000000..01f2856b0 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/INSTALLATION.md @@ -0,0 +1,100 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Installation and execution of Ansible modules for Dell Unity + +## Installation of SDK +* Install the python SDK named [Storops](https://pypi.org/project/storops/). It can be installed using pip, based on appropriate python version. Execute this command: + + pip install storops + +* Alternatively, Other installation ways can be found from [SDK](https://github.com/emc-openstack/storops#readme) page + +## Building collections + * Use this command to build the collection from source code: + + ansible-galaxy collection build + + For more details on how to build a tar ball, please refer to: [Building the collection](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_distributing.html#building-your-collection-tarball) + +## Installing collections + +#### Online installation of collections + * Use this command to install the latest collection hosted in [galaxy portal](https://galaxy.ansible.com/dellemc/unity): + + ansible-galaxy collection install dellemc.unity -p <install_path> + +#### Offline installation of collections + + * Download the latest tar build from any of the available distribution channel [Ansible Galaxy](https://galaxy.ansible.com/dellemc/unity) /[Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/dellemc/unity) and use this command to install the collection anywhere in your system: + + ansible-galaxy collection install dellemc-unity-1.6.0.tar.gz -p <install_path> + + * Set the environment variable: + + export ANSIBLE_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS:<install_path> + +## Using collections + + * In order to use any Ansible module, ensure that the importing of proper FQCN (Fully Qualified Collection Name) must be embedded in the playbook. + This example can be referred to: + + collections: + - dellemc.unity + + * In order to use installed collection in a specific task use a proper FQCN (Fully Qualified Collection Name). Refer to this example: + + tasks: + - name: Create volume + dellemc.unity.volume + + * For generating Ansible documentation for a specific module, embed the FQCN before the module name. Refer to this example: + + ansible-doc dellemc.unity.volume + + +## Ansible modules execution + +The Ansible server must be configured with Python library for Unity to run the Ansible playbooks. The [Documents](https://github.com/dell/ansible-unity/blob/1.6.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 + +* Copy the CA certificate to the "/etc/pki/ca-trust/source/anchors" path of the host by any external means. +* Set the "REQUESTS_CA_BUNDLE" environment variable to the path of the SSL certificate using the command: + + export REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/source/anchors/<<Certificate_Name>> +* Import the SSL certificate to host using the command: + + update-ca-trust extract +* If "TLS CA certificate bundle error" occurs, then follow these steps: + + cd /etc/pki/tls/certs/ + openssl x509 -in ca-bundle.crt -text -noout + +## Results +Each module returns the updated state and details of the entity, For example, if you are using the Volume module, all calls will return the updated details of the volume. Sample result is shown in each module's documentation. + +## Ansible execution environment +Ansible can also be installed in a container environment. Ansible Builder provides the ability to create reproducible, self-contained environments as container images that can be run as Ansible execution environments. +* Install the ansible builder package using: + + pip3 install ansible-builder +* Ensure the execution-environment.yml is at the root of collection and create the execution environment using: + + ansible-builder build --tag <tag_name> --container-runtime docker +* After the image is built, run the container using: + + docker run -it <tag_name> /bin/bash +* Verify collection installation using command: + + ansible-galaxy collection list +* The playbook can be run on the container using: + + docker run --rm -v $(pwd):/runner <tag_name> ansible-playbook info_test.yml diff --git a/ansible_collections/dellemc/unity/docs/ISSUE_TRIAGE.md b/ansible_collections/dellemc/unity/docs/ISSUE_TRIAGE.md new file mode 100644 index 000000000..d3e443494 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/ISSUE_TRIAGE.md @@ -0,0 +1,308 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Triage issues + +The main goal of issue triage is to categorize all incoming issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it. + +> **Note:** This information is for project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic. + +The core maintainers of this project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Triage provides an important way to contribute to an open source project. + +Triage helps ensure issues resolve quickly by: + +- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took. +- Giving a contributor the information they need before they commit to resolving an issue. +- Lowering the issue count by preventing duplicate issues. +- Streamlining the development process by preventing duplicate discussions. + +If you don't have the knowledge or time to code, consider helping with triage. The community will thank you for saving them time by spending some of yours. + +## 1. Find issues that need triage + +The easiest way to find issues that haven't been triaged is to search for issues with the `needs-triage` label. + +## 2. Ensure the issue contains basic information + +Make sure that the issue's author provided the standard issue information. This project utilizes GitHub issue templates to guide contributors to provide standard information that must be included for each type of template or type of issue. + +### Standard issue information that must be included + +This section describes the various issue templates and the expected content. + +#### Bug reports + +Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, output and any environment related information that's applicable and/or maybe related to the reported problem: + + - Ansible Version: [e.g. 2.14] + - Python Version [e.g. 3.10] + - Ansible modules for Dell Unity Version: [e.g. 1.6.0] + - Unity SDK version: [e.g. Unity 1.2.11] + - Any other additional information... + +#### Feature requests + +Should explain what feature that the author wants to be added and why that is needed. + +#### Ask a question requests + +In general, if the issue description and title is perceived as a question no more information is needed. + +### Good practices + +To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to: + +- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information. +- Make sure that issue descriptions doesn't include irrelevant information. +- Make sure that issues do not contain sensitive information. +- Make sure that issues have all relevant fields filled in. +- Do your best effort to change title and description or request suggested changes by adding a comment. + +> **Note:** Above rules are applicable to both new and existing issues. + +### Dealing with missing information + +Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `triage/needs-information`. + +If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time. Label issue with `triage/needs-information`. + +If the author does not respond to the requested information within the timespan of a week, close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided. + +If you receive a notification with additional information provided but you are not anymore on issue triage and you feel you do not have time to handle it, you should delegate it to the current person on issue triage. + +## 3. Categorizing an issue + +### Duplicate issues + +Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue: + +1. Add a comment `duplicate of #<issue number>` +2. Add the `triage/duplicate` label + +### Bug reports + +If it's not perfectly clear that it's an actual bug, quickly try to reproduce it. + +**It's a bug/it can be reproduced:** + +1. Add a comment describing detailed steps for how to reproduce it, if applicable. +2. If you know that maintainers wont be able to put any resources into it for some time then label the issue with `help wanted` and optionally `beginner friendly` together with pointers on which code to update to fix the bug. This should signal to the community that we would appreciate any help we can get to resolve this. +3. Move on to [prioritizing the issue](#4-prioritization-of-issues). + +**It can't be reproduced:** + +1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly. Provide details in a comment. +2. Either [delegate further investigations](#investigation-of-issues) to someone else. Provide details in a comment. + +**It works as intended/by design:** + +1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue. +2. Label the issue `triage/works-as-intended`. +3. Remove the `needs-triage` label. + +**It does not work as intended/by design:** + +### Feature requests + +1. If the feature request does not align with the product vision, add a comment indicating so, remove the `needs-triage` label and close the issue +2. Otherwise, move on to [prioritizing the issue](#4-prioritization-of-issues). Assign the appropriate priority label to the issue, add the appropriate comments to the issue, and remove the `needs-triage` label. + +## 4. Prioritization of issues + +In general bugs and feature request issues should be labeled with a priority. + +Adding priority levels can be difficult. Ensure you have the knowledge, context, and the experience before prioritizing any issues. If you have any uncertainty as to which priority level to assign, please ask the maintainers for help. + +The key here is asking for help and discuss issues to understand how more experienced project members think and reason. By doing that you learn more and eventually be more and more comfortable with prioritizing issues. + +In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help. + +| Label | Description | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority immediately. | +| `priority/high` | Must be worked on soon, ideally in time for the next release. | +| `priority/low` | Lowest priority. Possibly useful, but not yet enough interest in it. | + +### Critical priority + +1. If an issue has been categorized and any of this criteria apply, the issue should be labeled as critical and must be actively worked on as someone's top priority immediately. + + - Results in any data loss + - Critical security or performance issues + - Problem that makes a feature unusable + - Multiple users experience a severe problem affecting their business, users etc. + +2. Label the issue `priority/critical`. +3. Escalate the problem to the maintainers. +4. Assign or ask a maintainer for help assigning someone to make this issue their top priority immediately. +5. Add the issue to the next upcoming release milestone. + +### High priority + +1. Label the issue `priority/high`. +2. Add the issue to the next upcoming release milestone. +3. Prioritize it or assign someone to work on it now or very soon. +4. Consider requesting [help from the community](#5-requesting-help-from-the-community). + +### Low priority + +1. If the issue is deemed possibly useful but a low priority label the issue `priority/low`. +2. The amount of interest in the issue will determine if the priority elevated. +3. Consider requesting [help from the community](#5-requesting-help-from-the-community). + +## 5. Requesting help from the community + +Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement. In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged. + +In many cases the issue author or community as a whole is more suitable to contribute changes since they're experts in their domain. It's also quite common that someone has tried to get something to work using the documentation without success and made an effort to get it to work and/or reached out to the community to get the missing information. + +1. Kindly and politely add a comment to alert update subscribers. + - Explain the issue and the need for resolution. Be sure and detail that the issue has not been prioritized and that the issue has not been scheduled for work by the maintainers. + - If possible or applicable, add pointers and references to the code/files that need to be revised. Provide any ideas as to the solution. This will help the maintainers get started on resolving the issue. +2. Label the issue with `help wanted`. +3. If applicable, label the issue with `beginner friendly` to denote that the issue is suitable for a beginner to work on. + +## Investigation of issues + +When an issue has all basic information provided, but the reported problem cannot be reproduced at a first glance, the issue is labeled `triage/needs-information`. Depending on the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it. + +Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible. + +## External pull requests + +Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten. + +1. Check new external PRs which do not have a reviewer. +1. Check if there is a link to an existing issue. +1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one. +1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails). + +## GitHub issue management workflow + +This section describes the triage workflow for new GitGHub issues that get created. + +### GitHub Issue: Bug + +This workflow starts off with a GitHub issue of type bug being created. + +1. Collaborator or maintainer creates a GitHub bug using the appropriate GitHub issue template +2. By default a bug will be created with the `type/bug` and `needs-triage` labels + +The following flow chart outlines the triage process for bugs. + +<!-- https://textik.com/#38ec14781648871c --> +``` + +--------------------------+ + | New bug issue opened/more| + | information added | + +-------------|------------+ + | + | + +----------------------------------+ NO +--------------|-------------+ + | label: triage/needs-information --------- All required information | + | | | contained in issue? | + +-----------------------------|----+ +--------------|-------------+ + | | YES + | | + +--------------------------+ | +---------------------+ YES +---------------------------------------+ + |label: | | | Dupicate Issue? ------- Comment `Duplicate of #<issue number>` + |triage/needs-investigation| | NO | | | Remove needs-triage label | + +------|-------------------+ | +----------|----------+ | label: triage/duplicate | + | | | NO +-----------------|---------------------+ + YES | | | | + | +---------------|----+ NO +------------|------------+ | + | |Needs investigation?|---------- Can it be reproduced? | | + |------- | +------------|------------+ | + +--------------------+ | YES | + | +----------|----------+ + +-------------------------+ +------------|------------+ | Close Issue | + | Add release-found label |------------------ Works as intended? | | | + | label: release-found/* | NO | | +----------|----------+ + +------------|------------+ +------------|------------+ | + | | | + | | YES | + +-----------------------------+ +----------------|----------------+ | + | Add area label | | Add comment | | + | label: area/* | | Remove needs-triage label ------------------| + +------------|----------------+ | label: triage/works-as-intended | + | +---------------------------------+ + | + +------------|-------------+ +----------+ + | Add priority label | | Done ---------------------------------------- + | label: priority/* | +----|-----+ | + +------------|-------------+ |NO | + | | +------------------|------------------+ + +------------|-------------+ +----|----------------+ YES | Add details to issue | + | ------------ Signal Community? ---------- label: help wanted | + |Remove needs-triage label | | | | label: beginner friendly (optional)| + +--------------------------+ +---------------------+ +-------------------------------------+ + +``` + +If the author does not respond to a request for more information within the timespan of a week, close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided. + +### GitHub issue: feature request + +This workflow starts off with a GitHub issue of type feature request being created. + +1. Collaborator or maintainer creates a GitHub feature request using the appropriate GitHub issue template +2. By default a feature request will be created with the `type/feature-request` and `needs-triage` labels + +This flow chart outlines the triage process for feature requests. + +<!-- https://textik.com/#81e81fc717f63429 --> +``` + +---------------------------------+ + |New feature request issue opened/| + |more information added | + +----------------|----------------+ + | + | + +---------------------------------+ NO +-------------|------------+ + | label: triage/needs-information ---------- All required information | + | | | contained in issue? | + +---------------------------------+ +-------------|------------+ + | + | + +---------------------------------------+ | + |Comment `Duplicate of #<issue number>` | YES +----------|----------+ + |Remove needs-triage label ------- Duplicate issue? | + |label: triage/duplicate | | | + +-----|---------------------------------+ +-----------|---------+ + | |NO + | +-------------------------+ NO +-----------------------------+ + | |Add comment |-------- Does feature request align | + | |Remove needs-triage label| | with product vision? | + | +------|------------------+ +--------------|--------------+ + | | | YES + | | +-----------------|----------------+ + | | |Change feature-request to feature | + | | |Remove label: type/feature-request| + | | |Add label: type/feature | + | | +-----------------|----------------+ + | | | + | | +--------------|--------------+ + | | | Add area label | + | | | label: area/* | + | | +--------------|--------------+ + | | | + +-|---------|---+ +--------+ +--------------|--------------+ + | Close issue | | Done --------- Add priority label | + | | | | | label: priority/* | + +---------------+ +--------+ +-----------------------------+ +``` + +If the author does not respond to a request for more information within the timespan of a week, close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided. + +In some cases you may receive a request you do not wish to accept. Perhaps the request doesn't align with the project scope or vision. It is important to tactfully handle contributions that don't meet the project standards. + +1. Acknowledge the person behind the contribution and thank them for their interest and contribution +2. Explain why it didn't fit into the scope of the project or vision +3. Don't leave an unwanted contributions open. Immediately close the contribution you do not wish to accept diff --git a/ansible_collections/dellemc/unity/docs/MAINTAINERS.md b/ansible_collections/dellemc/unity/docs/MAINTAINERS.md new file mode 100644 index 000000000..4679f6d73 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/MAINTAINERS.md @@ -0,0 +1,18 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Maintainers + +* 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/ansible_collections/dellemc/unity/docs/MAINTAINER_GUIDE.md b/ansible_collections/dellemc/unity/docs/MAINTAINER_GUIDE.md new file mode 100644 index 000000000..78d13dd1d --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/MAINTAINER_GUIDE.md @@ -0,0 +1,38 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Maintainer guidelines + +As a Maintainer of this project you have the responsibility of keeping true to the vision of the project with high-degree quality. Being part of this group is a privilege that requires dedication and time to attend to the daily activities that are associated with the maintenance of this project. + +## Becoming a maintainer + +Most Maintainers started as Contributors that have demonstrated their commitment to the success of the project. Contributors wishing to become Maintainers, must demonstrate commitment to the success of the project by contributing code, reviewing others' work, and triaging issues on a regular basis for at least three months. + +The contributions alone don't make you a Maintainer. You need to earn the trust of the current Maintainers and other project Contributors, that your decisions and actions are in the best interest of the project. + +Periodically, the existing Maintainers curate a list of Contributors who have shown regular activity on the project over the prior months. It is from this list that Maintainer candidates are selected. + +After a candidate is selected, the existing Maintainers discuss the candidate over the next 5 business days, provide feedback, and vote. At least 75% of the current Maintainers must vote in the affirmative for a candidate to be moved to the role of Maintainer. + +If a candidate is approved, a Maintainer contacts the candidate to invite them to open a pull request that adds the contributor to the MAINTAINERS file. The candidate becomes a Maintainer once the pull request is merged. + +## Maintainer policies + +* Lead by example +* Follow the [Code of Conduct](https://github.com/dell/ansible-unity/blob/1.6.0/docs/CODE_OF_CONDUCT.md) and the guidelines in the [Contributing](https://github.com/dell/ansible-unity/blob/1.6.0/docs/CONTRIBUTING.md) and [Committer](https://github.com/dell/ansible-unity/blob/1.6.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. +* Clearly mark optional suggestions as such. Best practice, start your comment with *At your option: …* + +## Project decision making + +All project decisions should contribute to successfully executing on the project roadmap. Project milestones are established for each release. diff --git a/ansible_collections/dellemc/unity/docs/Release Notes.md b/ansible_collections/dellemc/unity/docs/Release Notes.md new file mode 100644 index 000000000..47d3fa3a5 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/Release Notes.md @@ -0,0 +1,78 @@ +**Ansible Modules for Dell Technologies Unity** +========================================= +### Release Notes 1.6.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. + +Content +------- +These release notes contain supplemental information about Ansible +Modules for Dell Technologies (Dell) Unity. + +- Revision History +- Product Description +- New Features & Enhancements +- Known Issues +- Limitations +- Distribution +- Documentation + +Revision history +---------------- +The table in this section lists the revision history of this document. + +Table 1. Revision history + +| Revision | Date | Description | +|----------|----------------|---------------------------------------------------------| +| 01 | March 2023 | Current release of Ansible Modules for Dell Unity 1.6.0 | + +Product Description +------------------- +The Ansible modules for Dell Unity are used to automate and orchestrate the deployment, configuration, and management of Dell Unity Family systems, including Unity, Unity XT, and the UnityVSA. The capabilities of Ansible modules are managing host, consistency group, filesystem, filesystem snapshots, CIFS server, NAS servers, NFS server, NFS export, SMB shares, interface, snapshots, snapshot schedules, storage pool, tree quota, user quota, volumes and obtaining Unity system information. The options available for each capability are list, show, create, delete, and modify; except for NAS server for which options available are list & modify and for CIFS server, NFS server the options available are create, list & modify. + +New features & enhancements +--------------------------- +This release has the following changes - + +- Support addition of host from the Host List to NFS Export in nfs module. +- Support enable/disable advanced dedup in volume module. +- Add synchronous replication support for filesystem. + +Known issues +------------ +Known issues in this release are listed below: +- Filesystem creation with quota config + - Setting quota configuration while creating a filesystem may sometimes cause a delay in fetching the details about the quota config of the new filesystem. The module will throw an error to rerun the task to see the expected result. + +- Mapping and unmapping of hosts for a Consistency group + - Interoperability between Ansible Unity playbooks and Unisphere REST API is not supported for the mapping and unmapping of hosts for a consistency group. + > **WORKAROUND:** It is recommended to use Ansible Unity modules consistently for all mapping and unmapping of hosts for a consistency group instead of partially/mutually doing it through Unisphere and Ansible modules. + +- Unmapping of LUN's from consistency group after disabling replication fails intermittently + - Immediate removal/unmapping of LUN's after disabling replication may fail with this error message which indicates that the consistency group has snapshots. + + ``` "The LUN cannot be removed from the Consistency group because there are snapshots of the Consistency group that include the selected LUN. Please remove all snapshots containing the selected LUN and try again. (Error Code:0x6000c16)" ``` + + > **NOTE:** It is recommended to avoid immediate removal/unmapping of LUN's after disabling replication. + + +Limitations +----------- +There are no known limitations. + +Distribution +---------------- +The software package is available for download from the [Ansible Modules +for Unity GitHub](https://github.com/dell/ansible-unity/) page. + +Documentation +------------- +The documentation is available on [Ansible Modules for Unity GitHub](https://github.com/dell/ansible-unity/tree/1.6.0/docs) +page. It includes the following: +- README +- Release Notes (this document) +- Product Guide diff --git a/ansible_collections/dellemc/unity/docs/SECURITY.md b/ansible_collections/dellemc/unity/docs/SECURITY.md new file mode 100644 index 000000000..16e1acf79 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/SECURITY.md @@ -0,0 +1,22 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +# Security policy + +The Ansible modules for Dell Unity 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-unity/blob/1.6.0/docs/CONTRIBUTING.md#Pull-requests) for more information. + +## Reporting a vulnerability + +Have you discovered a security vulnerability in this project? +We ask you to alert the maintainers by sending an email, describing the issue, impact, and fix - if applicable. + +You can reach the Ansible modules for Dell Unity maintainers at ansible.team@dell.com. diff --git a/ansible_collections/dellemc/unity/docs/SUPPORT.md b/ansible_collections/dellemc/unity/docs/SUPPORT.md new file mode 100644 index 000000000..78931d078 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/SUPPORT.md @@ -0,0 +1,12 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +--> + +## Support +For all your support needs you can interact with us on [GitHub](https://github.com/dell/ansible-unity) by creating a [GitHub Issue](https://github.com/dell/ansible-unity/issues) or through the [Ansible Community](https://www.dell.com/community/Automation/bd-p/Automation). diff --git a/ansible_collections/dellemc/unity/docs/modules/cifsserver.rst b/ansible_collections/dellemc/unity/docs/modules/cifsserver.rst new file mode 100644 index 000000000..71b7527f2 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/cifsserver.rst @@ -0,0 +1,306 @@ +.. _cifsserver_module: + + +cifsserver -- Manage CIFS server on Unity storage system +======================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing the CIFS server on the Unity storage system includes creating CIFS server, getting CIFS server details and deleting CIFS server. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + nas_server_name (optional, str, None) + Name of the NAS server on which CIFS server will be hosted. + + + nas_server_id (optional, str, None) + ID of the NAS server on which CIFS server will be hosted. + + + netbios_name (optional, str, None) + The computer name of the SMB server in Windows network. + + + workgroup (optional, str, None) + Standalone SMB server workgroup. + + + local_password (optional, str, None) + Standalone SMB server administrator password. + + + domain (optional, str, None) + The domain name where the SMB server is registered in Active Directory. + + + domain_username (optional, str, None) + Active Directory domain user name. + + + domain_password (optional, str, None) + Active Directory domain password. + + + cifs_server_name (optional, str, None) + The name of the CIFS server. + + + cifs_server_id (optional, str, None) + The ID of the CIFS server. + + + interfaces (optional, list, None) + List of file IP interfaces that service CIFS protocol of SMB server. + + + unjoin_cifs_server_account (optional, bool, None) + Keep SMB server account unjoined in Active Directory after deletion. + + ``false`` specifies keep SMB server account joined after deletion. + + ``true`` specifies unjoin SMB server account from Active Directory before deletion. + + + state (True, str, None) + Define whether the CIFS server should exist or not. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create CIFS server belonging to Active Directory + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "test_nas1" + cifs_server_name: "test_cifs" + domain: "ad_domain" + domain_username: "domain_username" + domain_password: "domain_password" + state: "present" + + - name: Get CIFS server details using CIFS server ID + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cifs_server_id: "cifs_37" + state: "present" + + - name: Get CIFS server details using NAS server name + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "test_nas1" + state: "present" + + - name: Delete CIFS server + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cifs_server_id: "cifs_37" + unjoin_cifs_server_account: True + domain_username: "domain_username" + domain_password: "domain_password" + state: "absent" + + - name: Create standalone CIFS server + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + netbios_name: "ANSIBLE_CIFS" + workgroup: "ansible" + local_password: "Password123!" + nas_server_name: "test_nas1" + state: "present" + + - name: Get CIFS server details using netbios name + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + netbios_name: "ANSIBLE_CIFS" + state: "present" + + - name: Delete standalone CIFS server + dellemc.unity.cifsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cifs_server_id: "cifs_40" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +cifs_server_details (When CIFS server exists, dict, {'description': None, 'domain': 'xxx.xxx.xxx.com', 'existed': True, 'file_interfaces': {'UnityFileInterfaceList': [{'UnityFileInterface': {'hash': -9223363258905013637, 'id': 'if_43'}}]}, 'hash': -9223363258905010379, 'health': {'UnityHealth': {'hash': 8777949765559}}, 'id': 'cifs_40', 'is_standalone': False, 'last_used_organizational_unit': 'ou=Computers,ou=Dell NAS servers', 'name': 'ansible_cifs', 'nas_server': {'UnityNasServer': {'hash': 8777949765531, 'id': 'nas_18'}}, 'netbios_name': 'ANSIBLE_CIFS', 'smb_multi_channel_supported': True, 'smb_protocol_versions': ['1.0', '2.0', '2.1', '3.0'], 'smbca_supported': True, 'workgroup': None}) + Details of the CIFS server. + + + id (, str, ) + Unique identifier of the CIFS server instance. + + + name (, str, ) + User-specified name for the SMB server. + + + netbios_name (, str, ) + Computer Name of the SMB server in windows network. + + + description (, str, ) + Description of the SMB server. + + + domain (, str, ) + Domain name where SMB server is registered in Active Directory. + + + workgroup (, str, ) + Windows network workgroup for the SMB server. + + + is_standalone (, bool, ) + Indicates whether the SMB server is standalone. + + + nasServer (, dict, ) + Information about the NAS server in the storage system. + + + UnityNasServer (, dict, ) + Information about the NAS server in the storage system. + + + id (, str, ) + Unique identifier of the NAS server instance. + + + + + file_interfaces (, dict, ) + The file interfaces associated with the NAS server. + + + UnityFileInterfaceList (, list, ) + List of file interfaces associated with the NAS server. + + + UnityFileInterface (, dict, ) + Details of file interface associated with the NAS server. + + + id (, str, ) + Unique identifier of the file interface. + + + + + + smb_multi_channel_supported (, bool, ) + Indicates whether the SMB 3.0+ multichannel feature is supported. + + + smb_protocol_versions (, list, ) + Supported SMB protocols, such as 1.0, 2.0, 2.1, 3.0, and so on. + + + smbca_supported (, bool, ) + Indicates whether the SMB server supports continuous availability. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/consistencygroup.rst b/ansible_collections/dellemc/unity/docs/modules/consistencygroup.rst new file mode 100644 index 000000000..ac5727cfd --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/consistencygroup.rst @@ -0,0 +1,506 @@ +.. _consistencygroup_module: + + +consistencygroup -- Manage consistency groups on Unity storage system +===================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing the consistency group on the Unity storage system includes creating new consistency group, adding volumes to consistency group, removing volumes from consistency group, mapping hosts to consistency group, unmapping hosts from consistency group, renaming consistency group, modifying attributes of consistency group, enabling replication in consistency group, disabling replication in consistency group and deleting consistency group. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + cg_name (optional, str, None) + The name of the consistency group. + + It is mandatory for the create operation. + + Specify either *cg_name* or *cg_id* (but not both) for any operation. + + + cg_id (optional, str, None) + The ID of the consistency group. + + It can be used only for get, modify, add/remove volumes, or delete operations. + + + 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 consistency group. + + If *volumes* are given, then *vol_state* should also be specified. + + Volumes cannot be added/removed from consistency group, if the consistency group or the volume has snapshots. + + + vol_id (optional, str, None) + The ID of the volume. + + + vol_name (optional, str, None) + The name of the volume. + + + + vol_state (optional, str, None) + String variable, describes the state of volumes inside consistency group. + + If *volumes* are given, then *vol_state* should also be specified. + + + new_cg_name (optional, str, None) + The new name of the consistency group, used in rename operation. + + + description (optional, str, None) + Description of the consistency group. + + + snap_schedule (optional, str, None) + Snapshot schedule assigned to the consistency group. + + Specifying an empty string "" removes the existing snapshot schedule from consistency group. + + + tiering_policy (optional, str, None) + Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. + + + hosts (optional, list, None) + This is a list of hosts. + + Either the host ID or name must be provided for mapping/unmapping hosts for a consistency group. + + If *hosts* are given, then *mapping_state* should also be specified. + + Hosts cannot be mapped to a consistency group, if the consistency group has no volumes. + + When a consistency group is being mapped to the host, users should not use the volume module to map the volumes in the consistency group to hosts. + + + host_id (optional, str, None) + The ID of the host. + + + host_name (optional, str, None) + The name of the host. + + + + mapping_state (optional, str, None) + String variable, describes the state of hosts inside the consistency group. + + If *hosts* are given, then *mapping_state* should also be specified. + + + replication_params (optional, dict, None) + Settings required for enabling replication. + + + destination_cg_name (optional, str, None) + Name of the destination consistency group. + + Default value will be source consistency group name prefixed by 'DR_'. + + + replication_mode (True, str, None) + The replication mode. + + + rpo (optional, int, None) + Maximum time to wait before the system syncs the source and destination LUNs. + + Option *rpo* should be specified if the *replication_mode* is ``asynchronous``. + + The value should be in range of ``5`` to ``1440``. + + + replication_type (optional, str, local) + Type of replication. + + + remote_system (optional, dict, None) + Details of remote system to which the replication is being configured. + + The *remote_system* option should be specified if the *replication_type* is ``remote``. + + + remote_system_host (True, str, None) + IP or FQDN for remote Unity unisphere Host. + + + remote_system_username (True, str, None) + User name of remote Unity unisphere Host. + + + remote_system_password (True, str, None) + Password of remote Unity unisphere Host. + + + remote_system_verifycert (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + remote_system_port (optional, int, 443) + Port at which remote Unity unisphere is hosted. + + + + destination_pool_name (optional, str, None) + Name of pool to allocate destination Luns. + + Mutually exclusive with *destination_pool_id*. + + + destination_pool_id (optional, str, None) + Id of pool to allocate destination Luns. + + Mutually exclusive with *destination_pool_name*. + + + + replication_state (optional, str, None) + State of the replication. + + + state (True, str, None) + Define whether the consistency group should exist or not. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + cg_name: "{{cg_name}}" + description: "{{description}}" + snap_schedule: "{{snap_schedule1}}" + state: "present" + + - name: Get details of consistency group using id + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_id: "{{cg_id}}" + state: "present" + + - name: Add volumes to consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_id: "{{cg_id}}" + volumes: + - vol_name: "Ansible_Test-3" + - vol_id: "sv_1744" + vol_state: "{{vol_state_present}}" + state: "present" + + - name: Rename consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_name: "{{cg_name}}" + new_cg_name: "{{new_cg_name}}" + state: "present" + + - name: Modify consistency group details + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_name: "{{new_cg_name}}" + snap_schedule: "{{snap_schedule2}}" + tiering_policy: "{{tiering_policy1}}" + state: "present" + + - name: Map hosts to a consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_id: "{{cg_id}}" + hosts: + - host_name: "10.226.198.248" + - host_id: "Host_511" + mapping_state: "mapped" + state: "present" + + - name: Unmap hosts from a consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_id: "{{cg_id}}" + hosts: + - host_id: "Host_511" + - host_name: "10.226.198.248" + mapping_state: "unmapped" + state: "present" + + - name: Remove volumes from consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_name: "{{new_cg_name}}" + volumes: + - vol_name: "Ansible_Test-3" + - vol_id: "sv_1744" + vol_state: "{{vol_state_absent}}" + state: "present" + + - name: Delete consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_name: "{{new_cg_name}}" + state: "absent" + + - name: Enable replication for consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_id: "cg_id_1" + replication_params: + destination_cg_name: "destination_cg_1" + replication_mode: "asynchronous" + rpo: 60 + replication_type: "remote" + remote_system: + remote_system_host: '10.1.2.3' + remote_system_verifycert: False + remote_system_username: 'username' + remote_system_password: 'password' + destination_pool_name: "pool_test_1" + replication_state: "enable" + state: "present" + + - name: Disable replication for consistency group + dellemc.unity.consistencygroup: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + cg_name: "dis_repl_ans_source" + replication_state: "disable" + state: "present" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +consistency_group_details (When consistency group exists, dict, {'advanced_dedup_status': 'DedupStatusEnum.DISABLED', 'block_host_access': None, 'cg_replication_enabled': False, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'data_reduction_status': 'DataReductionStatusEnum.DISABLED', 'datastores': None, 'dedup_status': None, 'description': 'Ansible testing', 'esx_filesystem_block_size': None, 'esx_filesystem_major_version': None, 'existed': True, 'filesystem': None, 'hash': 8776023812033, 'health': {'UnityHealth': {'hash': 8776023811889}}, 'host_v_vol_datastore': None, 'id': 'res_7477', 'is_replication_destination': False, 'is_snap_schedule_paused': None, 'luns': None, 'metadata_size': 0, 'metadata_size_allocated': 0, 'name': 'Ansible_CG_Testing', 'per_tier_size_used': None, 'pools': None, 'relocation_policy': 'TieringPolicyEnum.MIXED', 'replication_type': 'ReplicationTypeEnum.NONE', 'size_allocated': 0, 'size_total': 0, 'size_used': None, 'snap_count': 0, 'snap_schedule': None, 'snaps_size_allocated': 0, 'snaps_size_total': 0, 'snapshots': [], 'thin_status': 'ThinStatusEnum.FALSE', 'type': 'StorageResourceTypeEnum.CONSISTENCY_GROUP', 'virtual_volumes': None, 'vmware_uuid': None}) + Details of the consistency group. + + + id (, str, ) + The system ID given to the consistency group. + + + relocation_policy (, str, ) + FAST VP tiering policy for the consistency group. + + + cg_replication_enabled (, bool, ) + Whether or not the replication is enabled.. + + + snap_schedule (, dict, ) + Snapshot schedule applied to consistency group. + + + UnitySnapSchedule (, dict, ) + Snapshot schedule applied to consistency group. + + + id (, str, ) + The system ID given to the snapshot schedule. + + + name (, str, ) + The name of the snapshot schedule. + + + + + luns (, dict, ) + Details of volumes part of consistency group. + + + UnityLunList (, list, ) + List of volumes part of consistency group. + + + UnityLun (, dict, ) + Detail of volume. + + + id (, str, ) + The system ID given to volume. + + + name (, str, ) + The name of the volume. + + + + + + snapshots (, list, ) + List of snapshots of consistency group. + + + name (, str, ) + Name of the snapshot. + + + creation_time (, str, ) + Date and time on which the snapshot was taken. + + + expirationTime (, str, ) + Date and time after which the snapshot will expire. + + + storageResource (, dict, ) + Storage resource for which the snapshot was taken. + + + UnityStorageResource (, dict, ) + Details of the storage resource. + + + id (, str, ) + The id of the storage resource. + + + + + + block_host_access (, dict, ) + Details of hosts mapped to the consistency group. + + + UnityBlockHostAccessList (, list, ) + List of hosts mapped to consistency group. + + + UnityBlockHostAccess (, dict, ) + Details of host. + + + id (, str, ) + The ID of the host. + + + name (, str, ) + The name of the host. + + + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/filesystem.rst b/ansible_collections/dellemc/unity/docs/modules/filesystem.rst new file mode 100644 index 000000000..81881dfbb --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/filesystem.rst @@ -0,0 +1,643 @@ +.. _filesystem_module: + + +filesystem -- Manage filesystem on Unity storage system +======================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing filesystem on Unity storage system includes Create new filesystem, Modify snapschedule attribute of filesystem, Modify filesystem attributes, Display filesystem details, Display filesystem snapshots, Display filesystem snapschedule, Delete snapschedule associated with the filesystem, Delete filesystem, Create new filesystem with quota configuration, Enable, modify and disable replication. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + filesystem_name (optional, str, None) + The name of the filesystem. Mandatory only for the create operation. All the operations are supported through *filesystem_name*. + + It is mutually exclusive with *filesystem_id*. + + + filesystem_id (optional, str, None) + The id of the filesystem. + + It can be used only for get, modify, or delete operations. + + It is mutually exclusive with *filesystem_name*. + + + pool_name (optional, str, None) + This is the name of the pool where the filesystem will be created. + + Either the *pool_name* or *pool_id* must be provided to create a new filesystem. + + + pool_id (optional, str, None) + This is the ID of the pool where the filesystem will be created. + + Either the *pool_name* or *pool_id* must be provided to create a new filesystem. + + + size (optional, int, None) + The size of the filesystem. + + + cap_unit (optional, str, None) + The unit of the filesystem size. It defaults to ``GB``, if not specified. + + + nas_server_name (optional, str, None) + Name of the NAS server on which filesystem will be hosted. + + + nas_server_id (optional, str, None) + ID of the NAS server on which filesystem will be hosted. + + + supported_protocols (optional, str, None) + Protocols supported by the file system. + + It will be overridden by NAS server configuration if NAS Server is ``Multiprotocol``. + + + description (optional, str, None) + Description about the filesystem. + + Description can be removed by passing empty string (""). + + + smb_properties (optional, dict, None) + Advance settings for SMB. It contains optional candidate variables. + + + is_smb_sync_writes_enabled (optional, bool, None) + Indicates whether the synchronous writes option is enabled on the file system. + + + is_smb_notify_on_access_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_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) + Integer variable, determines the lowest directory level to which the enabled notifications apply. + + Minimum value is ``1``. + + + + data_reduction (optional, bool, None) + Boolean variable, specifies whether or not to enable compression. Compression is supported only for thin filesystem. + + + is_thin (optional, bool, None) + Boolean variable, specifies whether or not it is a thin filesystem. + + + access_policy (optional, str, None) + Access policy of a filesystem. + + + locking_policy (optional, str, None) + File system locking policies. These policy choices control whether the NFSv4 range locks must be honored. + + + tiering_policy (optional, str, None) + Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. + + + quota_config (optional, dict, None) + Configuration for quota management. It contains optional parameters. + + + grace_period (optional, int, None) + Grace period set in quota configuration after soft limit is reached. + + If *grace_period* is not set during creation of filesystem, it will be set to ``7 days`` by default. + + + grace_period_unit (optional, str, None) + Unit of grace period. + + Default unit is ``days``. + + + default_hard_limit (optional, int, None) + Default hard limit for user quotas and tree quotas. + + If *default_hard_limit* is not set while creation of filesystem, it will be set to ``0B`` by default. + + + default_soft_limit (optional, int, None) + Default soft limit for user quotas and tree quotas. + + If *default_soft_limit* is not set while creation of filesystem, it will be set to ``0B`` by default. + + + is_user_quota_enabled (optional, bool, None) + Indicates whether the user quota is enabled. + + If *is_user_quota_enabled* is not set while creation of filesystem, it will be set to ``false`` by default. + + Parameters *is_user_quota_enabled* and *quota_policy* are mutually exclusive. + + + quota_policy (optional, str, None) + Quota policy set in quota configuration. + + If *quota_policy* is not set while creation of filesystem, it will be set to ``FILE_SIZE`` by default. + + Parameters *is_user_quota_enabled* and *quota_policy* are mutually exclusive. + + + cap_unit (optional, str, None) + Unit of *default_soft_limit* and *default_hard_limit* size. + + Default unit is ``GB``. + + + + state (True, str, None) + State variable to determine whether filesystem will exist or not. + + + snap_schedule_name (optional, str, None) + This is the name of an existing snapshot schedule which is to be associated with the filesystem. + + This is mutually exclusive with *snapshot_schedule_id*. + + + snap_schedule_id (optional, str, None) + This is the id of an existing snapshot schedule which is to be associated with the filesystem. + + This is mutually exclusive with *snapshot_schedule_name*. + + + replication_params (optional, dict, None) + Settings required for enabling or modifying replication. + + + replication_name (optional, str, None) + Name of the replication session. + + + new_replication_name (optional, str, None) + Replication name to rename the session to. + + + replication_mode (optional, str, None) + The replication mode. + + This is a mandatory field while creating a replication session. + + + rpo (optional, int, None) + Maximum time to wait before the system syncs the source and destination LUNs. + + The *rpo* option should be specified if the *replication_mode* is ``asynchronous``. + + The value should be in range of ``5`` to ``1440`` for ``asynchronous``, ``0`` for ``synchronous`` and ``-1`` for ``manual``. + + + replication_type (optional, str, None) + Type of replication. + + + remote_system (optional, dict, None) + Details of remote system to which the replication is being configured. + + The *remote_system* option should be specified if the *replication_type* is ``remote``. + + + remote_system_host (True, str, None) + IP or FQDN for remote Unity unisphere Host. + + + remote_system_username (True, str, None) + User name of remote Unity unisphere Host. + + + remote_system_password (True, str, None) + Password of remote Unity unisphere Host. + + + remote_system_verifycert (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + remote_system_port (optional, int, 443) + Port at which remote Unity unisphere is hosted. + + + + destination_pool_id (optional, str, None) + ID of pool to allocate destination filesystem. + + + destination_pool_name (optional, str, None) + Name of pool to allocate destination filesystem. + + + + replication_state (optional, str, None) + State of the replication. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - SMB shares, NFS exports, and snapshots associated with filesystem need to be deleted prior to deleting a filesystem. + - The *quota_config* parameter can be used to update default hard limit and soft limit values to limit the maximum space that can be used. By default they both are set to 0 during filesystem creation which means unlimited. + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create FileSystem + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "ansible_test_fs" + nas_server_name: "lglap761" + pool_name: "pool_1" + size: 5 + state: "present" + + - name: Create FileSystem with quota configuration + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "ansible_test_fs" + nas_server_name: "lglap761" + pool_name: "pool_1" + size: 5 + quota_config: + grace_period: 8 + grace_period_unit: "days" + default_soft_limit: 10 + is_user_quota_enabled: False + state: "present" + + - name: Expand FileSystem size + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "ansible_test_fs" + nas_server_name: "lglap761" + size: 10 + state: "present" + + - name: Expand FileSystem size + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "ansible_test_fs" + nas_server_name: "lglap761" + size: 10 + state: "present" + + - name: Modify FileSystem smb_properties + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "ansible_test_fs" + nas_server_name: "lglap761" + smb_properties: + is_smb_op_locks_enabled: True + smb_notify_on_change_dir_depth: 5 + is_smb_notify_on_access_enabled: True + state: "present" + + - name: Modify FileSystem Snap Schedule + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_141" + snap_schedule_id: "{{snap_schedule_id}}" + state: "{{state_present}}" + + - name: Get details of FileSystem using id + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + state: "present" + + - name: Delete a FileSystem using id + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + state: "absent" + + - name: Enable replication on the fs + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + replication_params: + replication_name: "test_repl" + replication_type: "remote" + replication_mode: "asynchronous" + rpo: 60 + remote_system: + remote_system_host: '0.1.2.3' + remote_system_verifycert: False + remote_system_username: 'username' + remote_system_password: 'password' + destination_pool_name: "pool_test_1" + replication_state: "enable" + state: "present" + + - name: Modify replication on the fs + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + replication_params: + replication_name: "test_repl" + new_replication_name: "test_repl_updated" + replication_mode: "asynchronous" + rpo: 50 + replication_state: "enable" + state: "present" + + - name: Disable replication on the fs + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + replication_state: "disable" + state: "present" + + - name: Disable replication by specifying replication_name on the fs + dellemc.unity.filesystem: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "rs_405" + replication_params: + replication_name: "test_replication" + replication_state: "disable" + state: "present" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +filesystem_details (When filesystem exists, dict, {'access_policy': 'AccessPolicyEnum.UNIX', 'cifs_notify_on_change_dir_depth': 512, 'cifs_share': None, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'description': '', 'existed': True, 'folder_rename_policy': 'FSRenamePolicyEnum.SMB_RENAME_FORBIDDEN', 'format': 'FSFormatEnum.UFS64', 'hash': 8735427610152, 'health': {'UnityHealth': {'hash': 8735427614928}}, 'host_io_size': 'HostIOSizeEnum.GENERAL_8K', 'id': 'fs_65916', 'is_advanced_dedup_enabled': False, 'is_cifs_notify_on_access_enabled': False, 'is_cifs_notify_on_write_enabled': False, 'is_cifs_op_locks_enabled': False, 'is_cifs_sync_writes_enabled': False, 'is_data_reduction_enabled': False, 'is_read_only': False, 'is_smbca': False, 'is_thin_enabled': True, 'locking_policy': 'FSLockingPolicyEnum.MANDATORY', 'metadata_size': 11274289152, 'metadata_size_allocated': 4294967296, 'min_size_allocated': 0, 'name': 'test_fs', 'nas_server': {'id': 'nas_18', 'name': 'test_nas1'}, 'nfs_share': None, 'per_tier_size_used': [6979321856, 0, 0], 'pool': {'id': 'pool_7', 'name': 'pool 7'}, 'pool_full_policy': 'ResourcePoolFullPolicyEnum.FAIL_WRITES', 'quota_config': {'default_hard_limit': '0B', 'default_soft_limit': '0B', 'grace_period': '7.0 days', 'id': 'quotaconfig_171798760421_0', 'is_user_quota_enabled': False, 'quota_policy': 'QuotaPolicyEnum.FILE_SIZE'}, 'replication_sessions': {'current_transfer_est_remain_time': 0, 'id': '***', 'last_sync_time': '2022-05-12 11:20:38+00:00', 'local_role': 'ReplicationSessionReplicationRoleEnum.SOURCE', 'max_time_out_of_sync': 60, 'members': None, 'name': 'local_repl_new', 'network_status': 'ReplicationSessionNetworkStatusEnum.OK', 'remote_system': {'UnityRemoteSystem': {'hash': 8735426929707}}, 'replication_resource_type': 'ReplicationEndpointResourceTypeEnum.FILESYSTEM', 'src_resource_id': 'res_66444', 'src_status': 'ReplicationSessionStatusEnum.OK', 'status': 'ReplicationOpStatusEnum.AUTO_SYNC_CONFIGURED', 'sync_progress': 0, 'sync_state': 'ReplicationSessionSyncStateEnum.IDLE'}, 'size_allocated': 283148288, 'size_allocated_total': 4578148352, 'size_preallocated': 2401173504, 'size_total': 10737418240, 'size_total_with_unit': '10.0 GB', 'size_used': 1620312064, 'snap_count': 2, 'snaps_size': 21474869248, 'snaps_size_allocated': 32768, 'snapshots': [], 'supported_protocols': 'FSSupportedProtocolEnum.NFS', 'tiering_policy': 'TieringPolicyEnum.AUTOTIER_HIGH', 'type': 'FilesystemTypeEnum.FILESYSTEM'}) + Details of the filesystem. + + + id (, str, ) + The system generated ID given to the filesystem. + + + name (, str, ) + Name of the filesystem. + + + description (, str, ) + Description about the filesystem. + + + is_data_reduction_enabled (, bool, ) + Whether or not compression enabled on this filesystem. + + + size_total_with_unit (, str, ) + Size of the filesystem with actual unit. + + + tiering_policy (, str, ) + Tiering policy applied to this filesystem. + + + is_cifs_notify_on_access_enabled (, bool, ) + Indicates whether the system generates a notification when a user accesses the file system. + + + is_cifs_notify_on_write_enabled (, bool, ) + Indicates whether the system generates a notification when the file system is written to. + + + is_cifs_op_locks_enabled (, bool, ) + Indicates whether opportunistic file locks are enabled for the file system. + + + is_cifs_sync_writes_enabled (, bool, ) + Indicates whether the CIFS synchronous writes option is enabled for the file system. + + + cifs_notify_on_change_dir_depth (, int, ) + Indicates the lowest directory level to which the enabled notifications apply, if any. + + + pool (, dict, ) + The pool in which this filesystem is allocated. + + + id (, str, ) + The system ID given to the pool. + + + name (, str, ) + The name of the storage pool. + + + + nas_server (, dict, ) + The NAS Server details on which this filesystem is hosted. + + + id (, str, ) + The system ID given to the NAS Server. + + + name (, str, ) + The name of the NAS Server. + + + + snapshots (, list, ) + The list of snapshots of this filesystem. + + + id (, str, ) + The system ID given to the filesystem snapshot. + + + name (, str, ) + The name of the filesystem snapshot. + + + + is_thin_enabled (, bool, ) + Indicates whether thin provisioning is enabled for this filesystem. + + + snap_schedule_id (, str, ) + Indicates the id of the snap schedule associated with the filesystem. + + + snap_schedule_name (, str, ) + Indicates the name of the snap schedule associated with the filesystem. + + + quota_config (, dict, ) + Details of quota configuration of the filesystem created. + + + grace_period (, str, ) + Grace period set in quota configuration after soft limit is reached. + + + default_hard_limit (, int, ) + Default hard limit for user quotas and tree quotas. + + + default_soft_limit (, int, ) + Default soft limit for user quotas and tree quotas. + + + is_user_quota_enabled (, bool, ) + Indicates whether the user quota is enabled. + + + quota_policy (, str, ) + Quota policy set in quota configuration. + + + + replication_sessions (, dict, ) + List of replication sessions if replication is enabled. + + + id (, str, ) + ID of replication session + + + name (, str, ) + Name of replication session + + + remote_system (, dict, ) + Remote system + + + id (, str, ) + ID of remote system + + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@dattaarindam) <ansible.team@dell.com> +- Meenakshi Dembi (@dembim) <ansible.team@dell.com> +- Spandita Panigrahi (@panigs7) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/filesystem_snapshot.rst b/ansible_collections/dellemc/unity/docs/modules/filesystem_snapshot.rst new file mode 100644 index 000000000..c75f81611 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/filesystem_snapshot.rst @@ -0,0 +1,341 @@ +.. _filesystem_snapshot_module: + + +filesystem_snapshot -- Manage filesystem snapshot on the Unity storage system +============================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing Filesystem Snapshot on the Unity storage system includes create filesystem snapshot, get filesystem snapshot, modify filesystem snapshot and delete filesystem snapshot. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + snapshot_name (optional, str, None) + The name of the filesystem snapshot. + + Mandatory parameter for creating a filesystem snapshot. + + For all other operations either *snapshot_name* or *snapshot_id* is required. + + + snapshot_id (optional, str, None) + During creation snapshot_id is auto generated. + + For all other operations either *snapshot_id* or *snapshot_name* is required. + + + filesystem_name (optional, str, None) + The name of the Filesystem for which snapshot is created. + + For creation of filesystem snapshot either *filesystem_name* or *filesystem_id* is required. + + Not required for other operations. + + + filesystem_id (optional, str, None) + The ID of the Filesystem for which snapshot is created. + + For creation of filesystem snapshot either *filesystem_id* or *filesystem_name* is required. + + Not required for other operations. + + + nas_server_name (optional, str, None) + The name of the NAS server in which the Filesystem is created. + + For creation of filesystem snapshot either *nas_server_name* or *nas_server_id* is required. + + Not required for other operations. + + + nas_server_id (optional, str, None) + The ID of the NAS server in which the Filesystem is created. + + For creation of filesystem snapshot either *filesystem_id* or *filesystem_name* is required. + + Not required for other operations. + + + auto_delete (optional, bool, None) + This option specifies whether or not the filesystem snapshot will be automatically deleted. + + If set to ``true``, the filesystem snapshot will expire based on the pool auto deletion policy. + + If set to ``false``, the filesystem snapshot will not be auto deleted based on the pool auto deletion policy. + + Option *auto_delete* can not be set to ``true``, if *expiry_time* is specified. + + If during creation neither *auto_delete* nor *expiry_time* is mentioned then the filesystem snapshot will be created keeping *auto_delete* as ``true``. + + Once the *expiry_time* is set, then the filesystem snapshot cannot be assigned to the auto delete policy. + + + expiry_time (optional, str, None) + This option is for specifying the date and time after which the filesystem snapshot will expire. + + The time is to be mentioned in UTC timezone. + + The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits. + + + description (optional, str, None) + The additional information about the filesystem snapshot can be provided using this option. + + The description can be removed by passing an empty string. + + + fs_access_type (optional, str, None) + Access type of the filesystem snapshot. + + Required only during creation of filesystem snapshot. + + If not given, snapshot's access type will be ``Checkpoint``. + + + state (True, str, None) + The state option is used to mention the existence of the filesystem snapshot. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - Filesystem snapshot cannot be deleted, if it has nfs or smb share. + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create Filesystem Snapshot + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "ansible_test_FS_snap" + filesystem_name: "ansible_test_FS" + nas_server_name: "lglad069" + description: "Created using playbook" + auto_delete: True + fs_access_type: "Protocol" + state: "present" + + - name: Create Filesystem Snapshot with expiry time + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "ansible_test_FS_snap_1" + filesystem_name: "ansible_test_FS_1" + nas_server_name: "lglad069" + description: "Created using playbook" + expiry_time: "04/15/2021 2:30" + fs_access_type: "Protocol" + state: "present" + + - name: Get Filesystem Snapshot Details using Name + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "ansible_test_FS_snap" + state: "present" + + - name: Get Filesystem Snapshot Details using ID + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_id: "10008000403" + state: "present" + + - name: Update Filesystem Snapshot attributes + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "ansible_test_FS_snap" + description: "Description updated" + auto_delete: False + expiry_time: "04/15/2021 5:30" + state: "present" + + - name: Update Filesystem Snapshot attributes using ID + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_id: "10008000403" + expiry_time: "04/18/2021 8:30" + state: "present" + + - name: Delete Filesystem Snapshot using Name + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "ansible_test_FS_snap" + state: "absent" + + - name: Delete Filesystem Snapshot using ID + dellemc.unity.filesystem_snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_id: "10008000403" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +filesystem_snapshot_details (When filesystem snapshot exists, dict, {'access_type': 'FilesystemSnapAccessTypeEnum.CHECKPOINT', 'attached_wwn': None, 'creation_time': '2022-10-21 04:42:53.951000+00:00', 'creator_schedule': None, 'creator_type': 'SnapCreatorTypeEnum.USER_CUSTOM', 'creator_user': {'id': 'user_admin'}, 'description': 'Created using playbook', 'existed': True, 'expiration_time': None, 'filesystem_id': 'fs_137', 'filesystem_name': 'test', 'hash': 8739894572587, 'host_access': None, 'id': '171798721695', 'io_limit_policy': None, 'is_auto_delete': True, 'is_modifiable': False, 'is_modified': False, 'is_read_only': True, 'is_system_snap': False, 'last_writable_time': None, 'lun': None, 'name': 'test_FS_snap_1', 'nas_server_id': 'nas_1', 'nas_server_name': 'lglad072', 'parent_snap': None, 'size': 107374182400, 'snap_group': None, 'state': 'SnapStateEnum.READY'}) + Details of the filesystem snapshot. + + + access_type (, str, ) + Access type of filesystem snapshot. + + + attached_wwn (, str, ) + Attached WWN details. + + + creation_time (, str, ) + Creation time of filesystem snapshot. + + + creator_schedule (, str, ) + Creator schedule of filesystem snapshot. + + + creator_type (, str, ) + Creator type for filesystem snapshot. + + + creator_user (, str, ) + Creator user for filesystem snapshot. + + + description (, str, ) + Description of the filesystem snapshot. + + + expiration_time (, str, ) + Date and time after which the filesystem snapshot will expire. + + + is_auto_delete (, bool, ) + Is the filesystem snapshot is auto deleted or not. + + + id (, str, ) + Unique identifier of the filesystem snapshot instance. + + + name (, str, ) + The name of the filesystem snapshot. + + + size (, int, ) + Size of the filesystem snapshot. + + + filesystem_name (, str, ) + Name of the filesystem for which the snapshot exists. + + + filesystem_id (, str, ) + Id of the filesystem for which the snapshot exists. + + + nas_server_name (, str, ) + Name of the NAS server on which filesystem exists. + + + nas_server_id (, str, ) + Id of the NAS server on which filesystem exists. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajshree Khare (@kharer5) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/host.rst b/ansible_collections/dellemc/unity/docs/modules/host.rst new file mode 100644 index 000000000..b0afe55b9 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/host.rst @@ -0,0 +1,333 @@ +.. _host_module: + + +host -- Manage Host operations on Unity +======================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +The Host module contains the operations Creation of a Host, Addition of initiators to Host, Removal of initiators from Host, Modification of host attributes, Get details of a Host, Deletion of a Host, Addition of network address to Host, Removal of network address from Host. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + host_name (optional, str, None) + Name of the host. + + Mandatory for host creation. + + + host_id (optional, str, None) + Unique identifier of the host. + + Host Id is auto generated during creation. + + Except create, all other operations require either *host_id* or Ihost_name). + + + description (optional, str, None) + Host description. + + + host_os (optional, str, None) + Operating system running on the host. + + + new_host_name (optional, str, None) + New name for the host. + + Only required in rename host operation. + + + initiators (optional, list, None) + List of initiators to be added/removed to/from host. + + + initiator_state (optional, str, None) + State of the initiator. + + + network_address (optional, str, None) + Network address to be added/removed to/from the host. + + Enter valid IPV4 or host name. + + + network_address_state (optional, str, None) + State of the Network address. + + + state (True, str, None) + State of the host. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create empty Host + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "ansible-test-host" + host_os: "Linux" + description: "ansible-test-host" + state: "present" + + - name: Create Host with Initiators + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "ansible-test-host-1" + host_os: "Linux" + description: "ansible-test-host-1" + initiators: + - "iqn.1994-05.com.redhat:c38e6e8cfd81" + - "20:00:00:90:FA:13:81:8D:10:00:00:90:FA:13:81:8D" + initiator_state: "present-in-host" + state: "present" + + - name: Modify Host using host_id + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_id: "Host_253" + new_host_name: "ansible-test-host-2" + host_os: "Mac OS" + description: "Ansible tesing purpose" + state: "present" + + - name: Add Initiators to Host + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "ansible-test-host-2" + initiators: + - "20:00:00:90:FA:13:81:8C:10:00:00:90:FA:13:81:8C" + initiator_state: "present-in-host" + state: "present" + + - name: Get Host details using host_name + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "ansible-test-host-2" + state: "present" + + - name: Get Host details using host_id + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_id: "Host_253" + state: "present" + + - name: Delete Host + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "ansible-test-host-2" + state: "absent" + + - name: Add network address to Host + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "{{host_name}}" + network_address: "192.168.1.2" + network_address_state: "present-in-host" + state: "present" + + - name: Delete network address from Host + dellemc.unity.host: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + host_name: "{{host_name}}" + network_address: "192.168.1.2" + network_address_state: "absent-in-host" + state: "present" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +host_details (When host exists., dict, {'auto_manage_type': 'HostManageEnum.UNKNOWN', 'datastores': None, 'description': 'ansible-test-host-1', 'existed': True, 'fc_host_initiators': [{'id': 'HostInitiator_1', 'name': 'HostName_1', 'paths': [{'id': 'HostInitiator_1_Id1', 'is_logged_in': True}, {'id': 'HostInitiator_1_Id2', 'is_logged_in': True}]}], 'hash': 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', 'health': {'UnityHealth': {'hash': 8764429420954}}, 'host_container': None, 'host_luns': [], 'host_polled_uuid': None, 'host_pushed_uuid': None, 'host_uuid': None, 'host_v_vol_datastore': None, 'id': 'Host_2198', 'iscsi_host_initiators': [{'id': 'HostInitiator_2', 'name': 'HostName_2', 'paths': [{'id': 'HostInitiator_2_Id1', 'is_logged_in': True}, {'id': 'HostInitiator_2_Id2', 'is_logged_in': True}]}], 'last_poll_time': None, 'name': 'ansible-test-host-1', 'network_addresses': [], 'os_type': 'Linux', 'registration_type': None, 'storage_resources': None, 'tenant': None, 'type': 'HostTypeEnum.HOST_MANUAL', 'vms': None}) + Details of the host. + + + id (, str, ) + The system ID given to the host. + + + name (, str, ) + The name of the host. + + + description (, str, ) + Description about the host. + + + fc_host_initiators (, list, ) + Details of the FC initiators associated with the host. + + + id (, str, ) + Unique identifier of the FC initiator path. + + + name (, str, ) + FC Qualified Name (WWN) of the initiator. + + + paths (, list, ) + Details of the paths associated with the FC initiator. + + + id (, str, ) + Unique identifier of the path. + + + is_logged_in (, bool, ) + Indicates whether the host initiator is logged into the storage system. + + + + + iscsi_host_initiators (, list, ) + Details of the ISCSI initiators associated with the host. + + + id (, str, ) + Unique identifier of the ISCSI initiator path. + + + name (, str, ) + ISCSI Qualified Name (IQN) of the initiator. + + + paths (, list, ) + Details of the paths associated with the ISCSI initiator. + + + id (, str, ) + Unique identifier of the path. + + + is_logged_in (, bool, ) + Indicates whether the host initiator is logged into the storage system. + + + + + network_addresses (, list, ) + List of network addresses mapped to the host. + + + os_type (, str, ) + Operating system running on the host. + + + type (, str, ) + HostTypeEnum of the host. + + + host_luns (, list, ) + Details of luns attached to host. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajshree Khare (@kharer5) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/info.rst b/ansible_collections/dellemc/unity/docs/modules/info.rst new file mode 100644 index 000000000..7b1ef111c --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/info.rst @@ -0,0 +1,582 @@ +.. _info_module: + + +info -- Gathering information about Unity +========================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Gathering information about Unity storage system includes Get the details of Unity array, Get list of Hosts in Unity array, Get list of FC initiators in Unity array, Get list of iSCSI initiators in Unity array, Get list of Consistency groups in Unity array, Get list of Storage pools in Unity array, Get list of Volumes in Unity array, Get list of Snapshot schedules in Unity array, Get list of NAS servers in Unity array, Get list of File systems in Unity array, Get list of Snapshots in Unity array, Get list of SMB shares in Unity array, Get list of NFS exports in Unity array, Get list of User quotas in Unity array, Get list of Quota tree in Unity array, Get list of NFS Servers in Unity array, Get list of CIFS Servers in Unity array. Get list of Ethernet ports in Unity array. Get list of File interfaces used in Unity array. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + gather_subset (optional, list, None) + List of string variables to specify the Unity storage system entities for which information is required. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get detailed list of Unity entities + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - host + - fc_initiator + - iscsi_initiator + - cg + - storage_pool + - vol + - snapshot_schedule + - nas_server + - file_system + - snapshot + - nfs_export + - smb_share + - user_quota + - tree_quota + - disk_group + - nfs_server + - cifs_server + - ethernet_port + - file_interface + + - name: Get information of Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + + - name: Get list of hosts on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - host + + - name: Get list of FC initiators on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - fc_initiator + + - name: Get list of ISCSI initiators on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - iscsi_initiator + + - name: Get list of consistency groups on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - cg + + - name: Get list of storage pools on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - storage_pool + + - name: Get list of volumes on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - vol + + - name: Get list of snapshot schedules on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - snapshot_schedule + + - name: Get list of NAS Servers on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - nas_server + + - name: Get list of File Systems on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - file_system + + - name: Get list of Snapshots on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - snapshot + + - name: Get list of NFS exports on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - nfs_export + + - name: Get list of SMB shares on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - smb_share + + - name: Get list of user quotas on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - user_quota + + - name: Get list of quota trees on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - tree_quota + + - name: Get list of disk groups on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - disk_group + + - name: Get list of NFS Servers on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - nfs_server + + - name: Get list of CIFS Servers on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - cifs_server + + - name: Get list of ethernet ports on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - ethernet_port + + - name: Get list of file interfaces on Unity array + dellemc.unity.info: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + gather_subset: + - file_interface + + + +Return Values +------------- + +Array_Details (always, dict, {'api_version': '12.0', 'earliest_api_version': '4.0', 'existed': True, 'hash': 8766644083532, 'id': '0', 'model': 'Unity 480', 'name': 'APM00213404195', 'software_version': '5.2.1'}) + Details of the Unity Array. + + + api_version (, str, ) + The current api version of the Unity Array. + + + earliest_api_version (, str, ) + The earliest api version of the Unity Array. + + + model (, str, ) + The model of the Unity Array. + + + name (, str, ) + The name of the Unity Array. + + + software_version (, str, ) + The software version of the Unity Array. + + + +Hosts (When hosts exist., list, [{'auto_manage_type': 'HostManageEnum.UNKNOWN', 'datastores': None, 'description': '', 'existed': True, 'fc_host_initiators': None, 'hash': 8762200072289, 'health': {'UnityHealth': {'hash': 8762200072352}}, 'host_container': None, 'host_ip_ports': {'UnityHostIpPortList': [{'UnityHostIpPort': {'hash': 8762200072361}}]}, 'host_luns': None, 'host_polled_uuid': None, 'host_pushed_uuid': None, 'host_uuid': None, 'host_v_vol_datastore': None, 'id': 'Host_2191', 'iscsi_host_initiators': None, 'last_poll_time': None, 'name': '10.225.2.153', 'os_type': 'Linux', 'registration_type': None, 'storage_resources': None, 'tenant': None, 'type': 'HostTypeEnum.HOST_MANUAL', 'vms': None}]) + Details of the hosts. + + + id (, str, ) + The ID of the host. + + + name (, str, ) + The name of the host. + + + +FC_initiators (When FC initiator exist., list, [{'WWN': '20:00:00:0E:1E:E9:B8:FC:21:00:00:0E:1E:E9:B8:FC', 'id': 'HostInitiator_3'}, {'WWN': '20:00:00:0E:1E:E9:B8:F7:21:00:00:0E:1E:E9:B8:F7', 'id': 'HostInitiator_4'}]) + Details of the FC initiators. + + + WWN (, str, ) + The WWN of the FC initiator. + + + id (, str, ) + The id of the FC initiator. + + + +ISCSI_initiators (When ISCSI initiators exist., list, [{'IQN': 'iqn.1994-05.com.redhat:634d768090f', 'id': 'HostInitiator_1'}, {'IQN': 'iqn.1994-05.com.redhat:2835ba62cc6d', 'id': 'HostInitiator_2'}]) + Details of the ISCSI initiators. + + + IQN (, str, ) + The IQN of the ISCSI initiator. + + + id (, str, ) + The id of the ISCSI initiator. + + + +Consistency_Groups (When Consistency Groups exist., list, [{'advanced_dedup_status': 'DedupStatusEnum.DISABLED', 'block_host_access': {'UnityBlockHostAccessList': [{'UnityBlockHostAccess': {'hash': 8745385821206}}, {'UnityBlockHostAccess': {'hash': 8745386530115}}, {'UnityBlockHostAccess': {'hash': 8745386530124}}]}, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'data_reduction_status': 'DataReductionStatusEnum.DISABLED', 'datastores': None, 'dedup_status': None, 'description': 'CG has created with all parametres.', 'esx_filesystem_block_size': None, 'esx_filesystem_major_version': None, 'existed': True, 'filesystem': None, 'hash': 8745385801328, 'health': {'UnityHealth': {'hash': 8745386647098}}, 'host_v_vol_datastore': None, 'id': 'res_93', 'is_replication_destination': False, 'is_snap_schedule_paused': False, 'luns': {'UnityLunList': [{'UnityLun': {'hash': 8745389830024, 'id': 'sv_64'}}, {'UnityLun': {'hash': 8745386526751, 'id': 'sv_63'}}]}, 'metadata_size': 8858370048, 'metadata_size_allocated': 7516192768, 'name': 'CG1_Ansible_Test_SS', 'per_tier_size_used': [11811160064, 0, 0], 'pools': {'UnityPoolList': [{'UnityPool': {'hash': 8745386552375, 'id': 'pool_3'}}]}, 'relocation_policy': 'TieringPolicyEnum.AUTOTIER', 'replication_type': 'ReplicationTypeEnum.NONE', 'size_allocated': 99418112, 'size_total': 268435456000, 'size_used': None, 'snap_count': 1, 'snap_schedule': {'UnitySnapSchedule': {'hash': 8745386550224, 'id': 'snapSch_66'}}, 'snaps_size_allocated': 8888320, 'snaps_size_total': 108675072, 'thin_status': 'ThinStatusEnum.TRUE', 'type': 'StorageResourceTypeEnum.CONSISTENCY_GROUP', 'virtual_volumes': None, 'vmware_uuid': None}]) + Details of the Consistency Groups. + + + id (, str, ) + The ID of the Consistency Group. + + + name (, str, ) + The name of the Consistency Group. + + + +Storage_Pools (When Storage Pools exist., list, [{'alert_threshold': 70, 'creation_time': '2021-10-18 12:45:12+00:00', 'description': '', 'existed': True, 'harvest_state': 'UsageHarvestStateEnum.PAUSED_COULD_NOT_REACH_HWM', 'hash': 8741501012399, 'health': {'UnityHealth': {'hash': 8741501012363}}, 'id': 'pool_2', 'is_all_flash': False, 'is_empty': False, 'is_fast_cache_enabled': False, 'is_harvest_enabled': True, 'is_snap_harvest_enabled': False, 'metadata_size_subscribed': 312458870784, 'metadata_size_used': 244544700416, 'name': 'fastVP_pool', 'object_id': 12884901891, 'pool_fast_vp': {'UnityPoolFastVp': {'hash': 8741501228023}}, 'pool_space_harvest_high_threshold': 95.0, 'pool_space_harvest_low_threshold': 85.0, 'pool_type': 'StoragePoolTypeEnum.TRADITIONAL', 'raid_type': 'RaidTypeEnum.RAID5', 'rebalance_progress': None, 'size_free': 2709855928320, 'size_subscribed': 2499805044736, 'size_total': 3291018690560, 'size_used': 455513956352, 'snap_size_subscribed': 139720515584, 'snap_size_used': 66002944, 'snap_space_harvest_high_threshold': 25.0, 'snap_space_harvest_low_threshold': 20.0, 'tiers': {'UnityPoolTierList': [{'UnityPoolTier': {'hash': 8741500996410}}, {'UnityPoolTier': {'hash': 8741501009430}}, {'UnityPoolTier': {'hash': 8741501009508}}]}}]) + Details of the Storage Pools. + + + id (, str, ) + The ID of the Storage Pool. + + + name (, str, ) + The name of the Storage Pool. + + + +Volumes (When Volumes exist., list, [{'current_node': 'NodeEnum.SPB', 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'default_node': 'NodeEnum.SPB', 'description': None, 'effective_io_limit_max_iops': None, 'effective_io_limit_max_kbps': None, 'existed': True, 'family_base_lun': {'UnityLun': {'hash': 8774260820794, 'id': 'sv_27'}}, 'family_clone_count': 0, 'hash': 8774260854260, 'health': {'UnityHealth': {'hash': 8774260812499}}, 'host_access': {'UnityBlockHostAccessList': [{'UnityBlockHostAccess': {'hash': 8774260826387}}]}, 'id': 'sv_27', 'io_limit_policy': None, 'is_advanced_dedup_enabled': False, 'is_compression_enabled': None, 'is_data_reduction_enabled': False, 'is_replication_destination': False, 'is_snap_schedule_paused': False, 'is_thin_clone': False, 'is_thin_enabled': False, 'metadata_size': 4294967296, 'metadata_size_allocated': 4026531840, 'name': 'VSI-UNITY-test-task', 'per_tier_size_used': [111400714240, 0, 0], 'pool': {'UnityPool': {'hash': 8774260811427}}, 'size_allocated': 107374182400, 'size_total': 107374182400, 'size_used': None, 'snap_count': 0, 'snap_schedule': None, 'snap_wwn': '60:06:01:60:5C:F0:50:00:94:3E:91:4D:51:5A:4F:97', 'snaps_size': 0, 'snaps_size_allocated': 0, 'storage_resource': {'UnityStorageResource': {'hash': 8774267822228}}, 'tiering_policy': 'TieringPolicyEnum.AUTOTIER_HIGH', 'type': 'LUNTypeEnum.VMWARE_ISCSI', 'wwn': '60:06:01:60:5C:F0:50:00:00:B5:95:61:2E:34:DB:B2'}]) + Details of the Volumes. + + + id (, str, ) + The ID of the Volume. + + + name (, str, ) + The name of the Volume. + + + +Snapshot_Schedules (When Snapshot Schedules exist., list, [{'existed': True, 'hash': 8775599492651, 'id': 'snapSch_1', 'is_default': True, 'is_modified': None, 'is_sync_replicated': False, 'luns': None, 'modification_time': '2021-08-18 19:10:33.774000+00:00', 'name': 'CEM_DEFAULT_SCHEDULE_DEFAULT_PROTECTION', 'rules': {'UnitySnapScheduleRuleList': [{'UnitySnapScheduleRule': {'hash': 8775599498593}}]}, 'storage_resources': {'UnityStorageResourceList': [{'UnityStorageResource': {'hash': 8775599711597, 'id': 'res_88'}}, {'UnityStorageResource': {'hash': 8775599711528, 'id': 'res_3099'}}]}, 'version': 'ScheduleVersionEnum.LEGACY'}]) + Details of the Snapshot Schedules. + + + id (, str, ) + The ID of the Snapshot Schedule. + + + name (, str, ) + The name of the Snapshot Schedule. + + + +NAS_Servers (When NAS Servers exist., list, [{'allow_unmapped_user': None, 'cifs_server': None, 'current_sp': {'UnityStorageProcessor': {'hash': 8747629920422, 'id': 'spb'}}, 'current_unix_directory_service': 'NasServerUnixDirectoryServiceEnum.NONE', 'default_unix_user': None, 'default_windows_user': None, 'existed': True, 'file_dns_server': None, 'file_interface': {'UnityFileInterfaceList': [{'UnityFileInterface': {'hash': 8747626606870, 'id': 'if_6'}}]}, 'filesystems': {'UnityFileSystemList': [{'UnityFileSystem': {'hash': 8747625901355, 'id': 'fs_6892'}}]}, 'hash': 8747625900370, 'health': {'UnityHealth': {'hash': 8747625900493}}, 'home_sp': {'UnityStorageProcessor': {'hash': 8747625877420, 'id': 'spb'}}, 'id': 'nas_1', 'is_backup_only': False, 'is_multi_protocol_enabled': False, 'is_packet_reflect_enabled': False, 'is_replication_destination': False, 'is_replication_enabled': False, 'is_windows_to_unix_username_mapping_enabled': None, 'name': 'lglad072', 'pool': {'UnityPool': {'hash': 8747629920479, 'id': 'pool_3'}}, 'preferred_interface_settings': {'UnityPreferredInterfaceSettings': {'hash': 8747626625166, 'id': 'preferred_if_1'}}, 'replication_type': 'ReplicationTypeEnum.NONE', 'size_allocated': 2952790016, 'tenant': None, 'virus_checker': {'UnityVirusChecker': {'hash': 8747626604144, 'id': 'cava_1'}}}]) + Details of the NAS Servers. + + + id (, str, ) + The ID of the NAS Server. + + + name (, str, ) + The name of the NAS Server. + + + +File_Systems (When File Systems exist., list, [{'access_policy': 'AccessPolicyEnum.UNIX', 'cifs_notify_on_change_dir_depth': 512, 'cifs_share': None, 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'description': '', 'existed': True, 'folder_rename_policy': 'FSRenamePolicyEnum.SMB_RENAME_FORBIDDEN', 'format': 'FSFormatEnum.UFS64', 'hash': 8786518053735, 'health': {'UnityHealth': {'hash': 8786518049091}}, 'host_io_size': 'HostIOSizeEnum.GENERAL_8K', 'id': 'fs_12', 'is_advanced_dedup_enabled': False, 'is_cifs_notify_on_access_enabled': False, 'is_cifs_notify_on_write_enabled': False, 'is_cifs_op_locks_enabled': True, 'is_cifs_sync_writes_enabled': False, 'is_data_reduction_enabled': False, 'is_read_only': False, 'is_smbca': False, 'is_thin_enabled': True, 'locking_policy': 'FSLockingPolicyEnum.MANDATORY', 'metadata_size': 4294967296, 'metadata_size_allocated': 3758096384, 'min_size_allocated': 0, 'name': 'vro-daniel-test', 'nas_server': {'UnityNasServer': {'hash': 8786517296113, 'id': 'nas_1'}}, 'nfs_share': None, 'per_tier_size_used': [6442450944, 0, 0], 'pool': {'UnityPool': {'hash': 8786518259493, 'id': 'pool_3'}}, 'pool_full_policy': 'ResourcePoolFullPolicyEnum.FAIL_WRITES', 'size_allocated': 283148288, 'size_allocated_total': 4041244672, 'size_preallocated': 2401206272, 'size_total': 107374182400, 'size_used': 1620312064, 'snap_count': 0, 'snaps_size': 0, 'snaps_size_allocated': 0, 'storage_resource': {'UnityStorageResource': {'hash': 8786518044167, 'id': 'res_20'}}, 'supported_protocols': 'FSSupportedProtocolEnum.NFS', 'tiering_policy': 'TieringPolicyEnum.AUTOTIER_HIGH', 'type': 'FilesystemTypeEnum.FILESYSTEM'}]) + Details of the File Systems. + + + id (, str, ) + The ID of the File System. + + + name (, str, ) + The name of the File System. + + + +Snapshots (When Snapshots exist., list, [{'access_type': 'FilesystemSnapAccessTypeEnum.CHECKPOINT', 'attached_wwn': None, 'creation_time': '2022-04-06 11:19:26.818000+00:00', 'creator_schedule': None, 'creator_type': 'SnapCreatorTypeEnum.REP_V2', 'creator_user': None, 'description': '', 'existed': True, 'expiration_time': None, 'hash': 8739100256648, 'host_access': None, 'id': '38654716464', 'io_limit_policy': None, 'is_auto_delete': False, 'is_modifiable': False, 'is_modified': False, 'is_read_only': True, 'is_system_snap': True, 'last_writable_time': None, 'lun': {'UnityLun': {'hash': 8739100148962, 'id': 'sv_301'}}, 'name': '42949677504_APM00213404195_0000.ckpt000_9508038064690266.2_238', 'parent_snap': None, 'size': 3221225472, 'snap_group': None, 'state': 'SnapStateEnum.READY', 'storage_resource': {'UnityStorageResource': {'hash': 8739100173002, 'id': 'sv_301'}}}]) + Details of the Snapshots. + + + id (, str, ) + The ID of the Snapshot. + + + name (, str, ) + The name of the Snapshot. + + + +NFS_Exports (When NFS Exports exist., list, [{'anonymous_gid': 4294967294, 'anonymous_uid': 4294967294, 'creation_time': '2021-12-01 06:21:48.381000+00:00', 'default_access': 'NFSShareDefaultAccessEnum.NO_ACCESS', 'description': '', 'existed': True, 'export_option': 1, 'export_paths': ['10.230.24.20:/zack_nfs_01'], 'filesystem': {'UnityFileSystem': {'hash': 8747298565566, 'id': 'fs_67'}}, 'hash': 8747298565548, 'host_accesses': None, 'id': 'NFSShare_29', 'is_read_only': None, 'min_security': 'NFSShareSecurityEnum.SYS', 'modification_time': '2022-04-01 11:44:17.553000+00:00', 'name': 'zack_nfs_01', 'nfs_owner_username': None, 'no_access_hosts': None, 'no_access_hosts_string': '10.226.198.207,10.226.198.25,10.226.198.44,10.226.198.85,Host1, Host2,Host4,Host5,Host6,10.10.0.0/255.255.240.0', 'path': '/', 'read_only_hosts': None, 'read_only_hosts_string': '', 'read_only_root_access_hosts': None, 'read_only_root_hosts_string': '', 'read_write_hosts': None, 'read_write_hosts_string': '', 'read_write_root_hosts_string': '', 'role': 'NFSShareRoleEnum.PRODUCTION', 'root_access_hosts': None, 'snap': None, 'type': 'NFSTypeEnum.NFS_SHARE'}]) + Details of the NFS Exports. + + + id (, str, ) + The ID of the NFS Export. + + + name (, str, ) + The name of the NFS Export. + + + +SMB_Shares (When SMB Shares exist., list, [{'creation_time': '2022-03-17 11:56:54.867000+00:00', 'description': '', 'existed': True, 'export_paths': ['\\\\multi-prot-pie.extreme1.com\\multi-prot-hui', '\\\\10.230.24.26\\multi-prot-hui'], 'filesystem': {'UnityFileSystem': {'hash': 8741295638110, 'id': 'fs_140'}}, 'hash': 8741295638227, 'id': 'SMBShare_20', 'is_abe_enabled': False, 'is_ace_enabled': False, 'is_branch_cache_enabled': False, 'is_continuous_availability_enabled': False, 'is_dfs_enabled': False, 'is_encryption_enabled': False, 'is_read_only': None, 'modified_time': '2022-03-17 11:56:54.867000+00:00', 'name': 'multi-prot-hui', 'offline_availability': 'CifsShareOfflineAvailabilityEnum.NONE', 'path': '/', 'snap': None, 'type': 'CIFSTypeEnum.CIFS_SHARE', 'umask': '022'}]) + Details of the SMB Shares. + + + id (, str, ) + The ID of the SMB Share. + + + name (, str, ) + The name of the SMB Share. + + + +User_Quotas (When user quotas exist., list, [{'id': 'userquota_171798694698_0_60000', 'uid': 60000}, {'id': 'userquota_171798694939_0_5001', 'uid': 5001}]) + Details of the user quotas. + + + id (, str, ) + The ID of the user quota. + + + uid (, str, ) + The UID of the user quota. + + + +Tree_Quotas (When quota trees exist., list, [{'id': 'treequota_171798709589_1', 'path': '/vro-ui-fs-rkKfimmN'}, {'id': 'treequota_171798709590_1', 'path': '/vro-ui-fs-mGYXAMqk'}]) + Details of the quota trees. + + + id (, str, ) + The ID of the quota tree. + + + path (, str, ) + The path of the quota tree. + + + +Disk_Groups (When disk groups exist., list, [{'id': 'dg_3', 'name': '400 GB SAS Flash 2', 'tier_type': 'EXTREME_PERFORMANCE'}, {'id': 'dg_16', 'name': '600 GB SAS 10K', 'tier_type': 'PERFORMANCE'}]) + Details of the disk groups. + + + id (, str, ) + The ID of the disk group. + + + name (, str, ) + The name of the disk group. + + + tier_type (, str, ) + The tier type of the disk group. + + + +NFS_Servers (When NFS Servers exist., list, [{'id': 'nfs_3'}, {'id': 'nfs_4'}, {'id': 'nfs_9'}]) + Details of the NFS Servers. + + + id (, str, ) + The ID of the NFS Servers. + + + +CIFS_Servers (When CIFS Servers exist., list, [{'id': 'cifs_3', 'name': 'test_cifs_1'}, {'id': 'cifs_4', 'name': 'test_cifs_2'}, {'id': 'cifs_9', 'name': 'test_cifs_3'}]) + Details of the CIFS Servers. + + + id (, str, ) + The ID of the CIFS Servers. + + + name (, str, ) + The name of the CIFS server. + + + +Ethernet_ports (When ethernet ports exist., list, [{'id': 'spa_mgmt', 'name': 'SP A Management Port'}, {'id': 'spa_ocp_0_eth0', 'name': 'SP A 4-Port Card Ethernet Port 0'}, {'id': 'spa_ocp_0_eth1', 'name': 'SP A 4-Port Card Ethernet Port 1'}]) + Details of the ethernet ports. + + + id (, str, ) + The ID of the ethernet port. + + + name (, str, ) + The name of the ethernet port. + + + +File_interfaces (When file inetrface exist., list, [{'id': 'if_3', 'ip_address': 'xx.xx.xx.xx', 'name': '1_APMXXXXXXXXXX'}, {'id': 'if_3', 'ip_address': 'xx.xx.xx.xx', 'name': '2_APMXXXXXXXXXX'}, {'id': 'if_3', 'ip_address': 'xx.xx.xx.xx', 'name': '3_APMXXXXXXXXXX'}]) + Details of the file inetrfaces. + + + id (, str, ) + The ID of the file inetrface. + + + name (, str, ) + The name of the file inetrface. + + + ip_address (, str, ) + IP address of the file inetrface. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajshree Khare (@kharer5) <ansible.team@dell.com> +- Akash Shendge (@shenda1) <ansible.team@dell.com> +- Meenakshi Dembi (@dembim) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/interface.rst b/ansible_collections/dellemc/unity/docs/modules/interface.rst new file mode 100644 index 000000000..aad1c02e8 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/interface.rst @@ -0,0 +1,254 @@ +.. _interface_module: + + +interface -- Manage Interfaces on Unity storage system +====================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing the Interfaces on the Unity storage system includes adding Interfaces to NAS Server, getting details of interface and deleting configured interfaces. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + nas_server_name (optional, str, None) + Name of the NAS server for which interface will be configured. + + + nas_server_id (optional, str, None) + ID of the NAS server for which interface will be configured. + + + ethernet_port_name (optional, str, None) + Name of the ethernet port. + + + ethernet_port_id (optional, str, None) + ID of the ethernet port. + + + role (optional, str, None) + Indicates whether interface is configured as production or backup. + + + interface_ip (True, str, None) + IP of network interface. + + + netmask (optional, str, None) + Netmask of network interface. + + + prefix_length (optional, int, None) + Prefix length is mutually exclusive with *netmask*. + + + gateway (optional, str, None) + Gateway of network interface. + + + vlan_id (optional, int, None) + Vlan id of the interface. + + + state (True, str, None) + Define whether the interface should exist or not. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is supported. + - Modify operation for interface is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Add Interface as Backup to NAS Server + dellemc.unity.interface: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + ethernet_port_name: "SP A 4-Port Card Ethernet Port 0" + role: "BACKUP" + interface_ip: "xx.xx.xx.xx" + netmask: "xx.xx.xx.xx" + gateway: "xx.xx.xx.xx" + vlan_id: 324 + state: "present" + + - name: Add Interface as Production to NAS Server + dellemc.unity.interface: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + ethernet_port_name: "SP A 4-Port Card Ethernet Port 0" + role: "PRODUCTION" + interface_ip: "xx.xx.xx.xx" + netmask: "xx.xx.xx.xx" + gateway: "xx.xx.xx.xx" + vlan_id: 324 + state: "present" + + - name: Get interface details + dellemc.unity.interface: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + interface_ip: "xx.xx.xx.xx" + state: "present" + + - name: Delete Interface + dellemc.unity.interface: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + interface_ip: "xx.xx.xx.xx" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +interface_details (When interface is configured for NAS Server., dict, {'existed': True, 'gateway': 'xx.xx.xx.xx', 'hash': 8785300560421, 'health': {'UnityHealth': {'hash': 8785300565468}}, 'id': 'if_69', 'ip_address': '10.10.10.10', 'ip_port': {'UnityIpPort': {'hash': 8785300565300, 'id': 'spb_ocp_0_eth0'}}, 'ip_protocol_version': 'IpProtocolVersionEnum.IPv4', 'is_disabled': False, 'is_preferred': True, 'mac_address': '0C:48:C6:9F:57:BF', 'name': '36_APM00213404194', 'nas_server': {'UnityNasServer': {'hash': 8785300565417, 'id': 'nas_10'}}, 'netmask': '10.10.10.10', 'replication_policy': None, 'role': 'FileInterfaceRoleEnum.PRODUCTION', 'source_parameters': None, 'v6_prefix_length': None, 'vlan_id': 324}) + Details of the interface. + + + existed (, bool, ) + Indicates if interface exists. + + + gateway (, str, ) + Gateway of network interface. + + + id (, str, ) + Unique identifier interface. + + + ip_address (, str, ) + IP address of interface. + + + ip_port (, dict, ) + Port on which network interface is configured. + + + id (, str, ) + ID of ip_port. + + + + ip_protocol_version (, str, ) + IP protocol version. + + + is_disabled (, bool, ) + Indicates whether interface is disabled. + + + is_preferred (, bool, ) + Indicates whether interface is preferred. + + + mac_address (, bool, ) + Mac address of ip_port. + + + name (, bool, ) + System configured name of interface. + + + nas_server (, dict, ) + Details of NAS server where interface is configured. + + + id (, str, ) + ID of NAS Server. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Meenakshi Dembi (@dembim) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/nasserver.rst b/ansible_collections/dellemc/unity/docs/modules/nasserver.rst new file mode 100644 index 000000000..284f37326 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/nasserver.rst @@ -0,0 +1,468 @@ +.. _nasserver_module: + + +nasserver -- Manage NAS servers on Unity storage system +======================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing NAS servers on Unity storage system includes get, modification to the NAS servers. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + nas_server_id (optional, str, None) + The ID of the NAS server. + + Either *nas_server_name* or *nas_server_id* is required to perform the task. + + The parameters *nas_server_name* and *nas_server_id* are mutually exclusive. + + + nas_server_name (optional, str, None) + The Name of the NAS server. + + Either *nas_server_name* or *nas_server_id* is required to perform the task. + + The parameters *nas_server_name* and *nas_server_id* are mutually exclusive. + + + nas_server_new_name (optional, str, None) + The new name of the NAS server. + + It can be mentioned during modification of the NAS server. + + + is_replication_destination (optional, bool, None) + It specifies whether the NAS server is a replication destination. + + It can be mentioned during modification of the NAS server. + + + is_backup_only (optional, bool, None) + It specifies whether the NAS server is used as backup only. + + It can be mentioned during modification of the NAS server. + + + is_multiprotocol_enabled (optional, bool, None) + This parameter indicates whether multiprotocol sharing mode is enabled. + + It can be mentioned during modification of the NAS server. + + + allow_unmapped_user (optional, bool, None) + This flag is used to mandatorily disable access in case of any user mapping failure. + + If ``true``, then enable access in case of any user mapping failure. + + If ``false``, then disable access in case of any user mapping failure. + + It can be mentioned during modification of the NAS server. + + + default_windows_user (optional, str, None) + Default windows user name used for granting access in the case of Unix to Windows user mapping failure. + + It can be mentioned during modification of the NAS server. + + + default_unix_user (optional, str, None) + Default Unix user name used for granting access in the case of Windows to Unix user mapping failure. + + It can be mentioned during modification of the NAS server. + + + enable_windows_to_unix_username_mapping (optional, bool, None) + This parameter indicates whether a Unix to/from Windows user name mapping is enabled. + + It can be mentioned during modification of the NAS server. + + + is_packet_reflect_enabled (optional, bool, None) + If the packet has to be reflected, then this parameter has to be set to ``true``. + + It can be mentioned during modification of the NAS server. + + + current_unix_directory_service (optional, str, None) + This is the directory service used for querying identity information for UNIX (such as UIDs, GIDs, net groups). + + It can be mentioned during modification of the NAS server. + + + replication_params (optional, dict, None) + Settings required for enabling replication. + + + destination_nas_server_name (optional, str, None) + Name of the destination nas server. + + Default value will be source nas server name prefixed by 'DR_'. + + + replication_mode (optional, str, None) + The replication mode. + + This is mandatory to enable replication. + + + rpo (optional, int, None) + Maximum time to wait before the system syncs the source and destination LUNs. + + The *rpo* option should be specified if the *replication_mode* is ``asynchronous``. + + The value should be in range of ``5`` to ``1440``. + + + replication_type (optional, str, None) + Type of replication. + + + remote_system (optional, dict, None) + Details of remote system to which the replication is being configured. + + The *remote_system* option should be specified if the *replication_type* is ``remote``. + + + remote_system_host (True, str, None) + IP or FQDN for remote Unity unisphere Host. + + + remote_system_username (True, str, None) + User name of remote Unity unisphere Host. + + + remote_system_password (True, str, None) + Password of remote Unity unisphere Host. + + + remote_system_verifycert (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + remote_system_port (optional, int, 443) + Port at which remote Unity unisphere is hosted. + + + + destination_pool_name (optional, str, None) + Name of pool to allocate destination Luns. + + Mutually exclusive with *destination_pool_id*. + + + destination_pool_id (optional, str, None) + Id of pool to allocate destination Luns. + + Mutually exclusive with *destination_pool_name*. + + + destination_sp (optional, str, None) + Storage process of destination nas server + + + is_backup (optional, bool, None) + Indicates if the destination nas server is backup. + + + replication_name (optional, str, None) + User defined name for replication session. + + + new_replication_name (optional, str, None) + Replication name to rename the session to. + + + + replication_state (optional, str, None) + State of the replication. + + + replication_reuse_resource (optional, bool, None) + This parameter indicates if existing NAS Server is to be used for replication. + + + state (True, str, None) + Define the state of NAS server on the array. + + The value present indicates that NAS server should exist on the system after the task is executed. + + In this release deletion of NAS server is not supported. Hence, if state is set to ``absent`` for any existing NAS server then error will be thrown. + + For any non-existing NAS server, if state is set to ``absent`` then it will return None. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Get Details of NAS Server + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "{{nas_server_name}}" + state: "present" + + - name: Modify Details of NAS Server + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "{{nas_server_name}}" + nas_server_new_name: "updated_sample_nas_server" + is_replication_destination: False + is_backup_only: False + is_multiprotocol_enabled: True + allow_unmapped_user: True + default_unix_user: "default_unix_sample_user" + default_windows_user: "default_windows_sample_user" + enable_windows_to_unix_username_mapping: True + current_unix_directory_service: "LDAP" + is_packet_reflect_enabled: True + state: "present" + + - name: Enable replication for NAS Server on Local System + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_id: "nas_10" + replication_reuse_resource: False + replication_params: + replication_name: "test_replication" + destination_nas_server_name: "destination_nas" + replication_mode: "asynchronous" + rpo: 60 + replication_type: "local" + destination_pool_name: "Pool_Ansible_Neo_DND" + destination_sp: "SPA" + is_backup: True + replication_state: "enable" + state: "present" + + - name: Enable replication for NAS Server on Remote System + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + replication_reuse_resource: False + replication_params: + replication_name: "test_replication" + destination_nas_server_name: "destination_nas" + replication_mode: "asynchronous" + rpo: 60 + replication_type: "remote" + remote_system: + remote_system_host: '10.10.10.10' + remote_system_verifycert: False + remote_system_username: 'test1' + remote_system_password: 'test1!' + destination_pool_name: "fastVP_pool" + destination_sp: "SPA" + is_backup: True + replication_state: "enable" + state: "present" + + - name: Enable replication for NAS Server on Remote System in existing NAS Server + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + replication_reuse_resource: True + replication_params: + destination_nas_server_name: "destination_nas" + replication_mode: "asynchronous" + rpo: 60 + replication_type: "remote" + replication_name: "test_replication" + remote_system: + remote_system_host: '10.10.10.10' + remote_system_verifycert: False + remote_system_username: 'test1' + remote_system_password: 'test1!' + destination_pool_name: "fastVP_pool" + replication_state: "enable" + state: "present" + + - name: Modify replication on the nasserver + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + replication_params: + replication_name: "test_repl" + new_replication_name: "test_repl_updated" + replication_mode: "asynchronous" + rpo: 50 + replication_state: "enable" + state: "present" + + - name: Disable replication on the nasserver + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + replication_state: "disable" + state: "present" + + - name: Disable replication by specifying replication_name on the nasserver + dellemc.unity.nasserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + replication_params: + replication_name: "test_replication" + replication_state: "disable" + state: "present" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +nas_server_details (When NAS server exists., dict, {'allow_unmapped_user': None, 'cifs_server': {'UnityCifsServerList': [{'UnityCifsServer': {'hash': 8761756885270, 'id': 'cifs_34'}}]}, 'current_sp': {'UnityStorageProcessor': {'hash': 8761756885273, 'id': 'spb'}}, 'current_unix_directory_service': 'NasServerUnixDirectoryServiceEnum.NIS', 'default_unix_user': None, 'default_windows_user': None, 'existed': True, 'file_dns_server': {'UnityFileDnsServer': {'hash': 8761756885441, 'id': 'dns_12'}}, 'file_interface': {'UnityFileInterfaceList': [{'UnityFileInterface': {'hash': 8761756889908, 'id': 'if_37'}}]}, 'filesystems': None, 'hash': 8761757005084, 'health': {'UnityHealth': {'hash': 8761756867588}}, 'home_sp': {'UnityStorageProcessor': {'hash': 8761756867618, 'id': 'spb'}}, 'id': 'nas_10', 'is_backup_only': False, 'is_multi_protocol_enabled': False, 'is_packet_reflect_enabled': False, 'is_replication_destination': False, 'is_replication_enabled': True, 'is_windows_to_unix_username_mapping_enabled': None, 'name': 'dummy_nas', 'pool': {'UnityPool': {'hash': 8761756885360, 'id': 'pool_7'}}, 'preferred_interface_settings': {'UnityPreferredInterfaceSettings': {'hash': 8761756885438, 'id': 'preferred_if_10'}}, 'replication_type': 'ReplicationTypeEnum.REMOTE', 'size_allocated': 3489660928, 'tenant': None, 'virus_checker': {'UnityVirusChecker': {'hash': 8761756885426, 'id': 'cava_10'}}}) + The NAS server details. + + + name (, str, ) + Name of the NAS server. + + + id (, str, ) + ID of the NAS server. + + + allow_unmapped_user (, bool, ) + Enable/disable access status in case of any user mapping failure. + + + current_unix_directory_service (, str, ) + Directory service used for querying identity information for UNIX (such as UIDs, GIDs, net groups). + + + default_unix_user (, str, ) + Default Unix user name used for granting access in the case of Windows to Unix user mapping failure. + + + default_windows_user (, str, ) + Default windows user name used for granting access in the case of Unix to Windows user mapping failure. + + + is_backup_only (, bool, ) + Whether the NAS server is used as backup only. + + + is_multi_protocol_enabled (, bool, ) + Indicates whether multiprotocol sharing mode is enabled. + + + is_packet_reflect_enabled (, bool, ) + If the packet reflect has to be enabled. + + + is_replication_destination (, bool, ) + If the NAS server is a replication destination then True. + + + is_windows_to_unix_username_mapping_enabled (, bool, ) + Indicates whether a Unix to/from Windows user name mapping is enabled. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/nfs.rst b/ansible_collections/dellemc/unity/docs/modules/nfs.rst new file mode 100644 index 000000000..cce2058f5 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/nfs.rst @@ -0,0 +1,626 @@ +.. _nfs_module: + + +nfs -- Manage NFS export on Unity storage system +================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing NFS export on Unity storage system includes- Create new NFS export, Modify NFS export attributes, Display NFS export details, Delete NFS export. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + nfs_export_name (optional, str, None) + 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) + ID of the nfs export. + + This is a unique ID generated by Unity storage system. + + + filesystem_name (optional, str, None) + Name of the filesystem for which NFS export will be created. + + Either filesystem or snapshot is required for creation of the NFS. + + 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. + + + filesystem_id (optional, str, None) + ID of the filesystem. + + This is a unique ID generated by Unity storage system. + + + snapshot_name (optional, str, None) + 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 parameter is provided, then filesystem cannot be specified. + + + snapshot_id (optional, str, None) + ID of the snapshot. + + This is a unique ID generated by Unity storage system. + + + nas_server_name (optional, str, None) + Name of the NAS server on which filesystem will be hosted. + + + nas_server_id (optional, str, None) + ID of the NAS server on which filesystem will be hosted. + + + 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) + Description of the NFS export. + + Optional parameter when creating a NFS export. + + To modify description, pass the new value in *description* field. + + To remove description, pass the empty value in *description* field. + + + host_state (optional, str, None) + Define whether the hosts can access the NFS export. + + Required when adding or removing access of hosts from the export. + + + 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 4294967294. + + + 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 4294967294. + + + state (True, str, None) + State variable to determine whether NFS export will exist or not. + + + default_access (optional, str, None) + Default access level for all hosts that can access the NFS 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``. + + + min_security (optional, str, None) + NFS enforced security type for users accessing a NFS export. + + If not specified at the time of creation, it will be set to ``SYS``. + + + adv_host_mgmt_enabled (optional, bool, None) + If ``false``, allows you to specify hosts without first having to register them. + + Mandatory while adding access hosts. + + + no_access_hosts (optional, list, None) + Hosts with no access to the NFS export. + + List of dictionaries. Each dictionary will have any of the keys from *host_name*, *host_id*, *subnet*, *netgroup*, *domain* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``true`` then the accepted keys are *host_name*, *host_id* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``false`` then the accepted keys are *host_name*, *subnet*, *netgroup*, *domain* and *ip_address*. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + ip_address (optional, str, None) + IP address of the host. + + + subnet (optional, str, None) + Subnet can be an 'IP address/netmask' or 'IP address/prefix length'. + + + netgroup (optional, str, None) + Netgroup that is defined in NIS or the local netgroup file. + + + domain (optional, str, None) + DNS domain, where all NFS clients in the domain are included in the host list. + + + + read_only_hosts (optional, list, None) + Hosts with read-only access to the NFS export. + + List of dictionaries. Each dictionary will have any of the keys from *host_name*, *host_id*, *subnet*, *netgroup*, *domain* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``true`` then the accepted keys are *host_name*, *host_id* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``false`` then the accepted keys are *host_name*, *subnet*, *netgroup*, *domain* and *ip_address*. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + ip_address (optional, str, None) + IP address of the host. + + + subnet (optional, str, None) + Subnet can be an 'IP address/netmask' or 'IP address/prefix length'. + + + netgroup (optional, str, None) + Netgroup that is defined in NIS or the local netgroup file. + + + domain (optional, str, None) + DNS domain, where all NFS clients in the domain are included in the host list. + + + + read_only_root_hosts (optional, list, None) + Hosts with read-only for root user access to the NFS export. + + List of dictionaries. Each dictionary will have any of the keys from *host_name*, *host_id*, *subnet*, *netgroup*, *domain* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``true`` then the accepted keys are *host_name*, *host_id* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``false`` then the accepted keys are *host_name*, *subnet*, *netgroup*, *domain* and *ip_address*. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + ip_address (optional, str, None) + IP address of the host. + + + subnet (optional, str, None) + Subnet can be an 'IP address/netmask' or 'IP address/prefix length'. + + + netgroup (optional, str, None) + Netgroup that is defined in NIS or the local netgroup file. + + + domain (optional, str, None) + DNS domain, where all NFS clients in the domain are included in the host list. + + + + read_write_hosts (optional, list, None) + Hosts with read and write access to the NFS export. + + List of dictionaries. Each dictionary will have any of the keys from *host_name*, *host_id*, *subnet*, *netgroup*, *domain* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``true`` then the accepted keys are *host_name*, *host_id* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``false`` then the accepted keys are *host_name*, *subnet*, *netgroup*, *domain* and *ip_address*. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + ip_address (optional, str, None) + IP address of the host. + + + subnet (optional, str, None) + Subnet can be an 'IP address/netmask' or 'IP address/prefix length'. + + + netgroup (optional, str, None) + Netgroup that is defined in NIS or the local netgroup file. + + + domain (optional, str, None) + DNS domain, where all NFS clients in the domain are included in the host list. + + + + read_write_root_hosts (optional, list, None) + Hosts with read and write for root user access to the NFS export. + + List of dictionaries. Each dictionary will have any of the keys from *host_name*, *host_id*, *subnet*, *netgroup*, *domain* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``true`` then the accepted keys are *host_name*, *host_id* and *ip_address*. + + If *adv_host_mgmt_enabled* is ``false`` then the accepted keys are *host_name*, *subnet*, *netgroup*, *domain* and *ip_address*. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + ip_address (optional, str, None) + IP address of the host. + + + subnet (optional, str, None) + Subnet can be an 'IP address/netmask' or 'IP address/prefix length'. + + + netgroup (optional, str, None) + Netgroup that is defined in NIS or the local netgroup file. + + + domain (optional, str, None) + DNS domain, where all NFS clients in the domain are included in the host list. + + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create nfs export from filesystem + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + path: '/' + filesystem_id: "fs_377" + state: "present" + + - name: Create nfs export from snapshot + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_snap" + path: '/' + snapshot_name: "ansible_fs_snap" + state: "present" + + - name: Modify nfs export + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + nas_server_id: "nas_3" + description: "" + default_access: "READ_ONLY_ROOT" + anonymous_gid: 4294967290 + anonymous_uid: 4294967290 + state: "present" + + - name: Add host in nfs export with adv_host_mgmt_enabled as true + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + filesystem_id: "fs_377" + adv_host_mgmt_enabled: true + no_access_hosts: + - host_id: "Host_1" + read_only_hosts: + - host_id: "Host_2" + read_only_root_hosts: + - host_name: "host_name1" + read_write_hosts: + - host_name: "host_name2" + read_write_root_hosts: + - ip_address: "1.1.1.1" + host_state: "present-in-export" + state: "present" + + - name: Remove host in nfs export with adv_host_mgmt_enabled as true + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + filesystem_id: "fs_377" + adv_host_mgmt_enabled: true + no_access_hosts: + - host_id: "Host_1" + read_only_hosts: + - host_id: "Host_2" + read_only_root_hosts: + - host_name: "host_name1" + read_write_hosts: + - host_name: "host_name2" + read_write_root_hosts: + - ip_address: "1.1.1.1" + host_state: "absent-in-export" + state: "present" + + - name: Add host in nfs export with adv_host_mgmt_enabled as false + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + filesystem_id: "fs_377" + adv_host_mgmt_enabled: false + no_access_hosts: + - domain: "google.com" + read_only_hosts: + - netgroup: "netgroup_admin" + read_only_root_hosts: + - host_name: "host5" + read_write_hosts: + - subnet: "168.159.57.4/255.255.255.0" + read_write_root_hosts: + - ip_address: "10.255.2.4" + host_state: "present-in-export" + state: "present" + + - name: Remove host in nfs export with adv_host_mgmt_enabled as false + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_from_fs" + filesystem_id: "fs_377" + adv_host_mgmt_enabled: false + no_access_hosts: + - domain: "google.com" + read_only_hosts: + - netgroup: "netgroup_admin" + read_only_root_hosts: + - host_name: "host5" + read_write_hosts: + - subnet: "168.159.57.4/255.255.255.0" + read_write_root_hosts: + - ip_address: "10.255.2.4" + host_state: "absent-in-export" + state: "present" + + - name: Get nfs details + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_id: "NFSShare_291" + state: "present" + + - name: Delete nfs export by nfs name + dellemc.unity.nfs: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nfs_export_name: "ansible_nfs_name" + nas_server_name: "ansible_nas_name" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, false) + Whether or not the resource has changed. + + +nfs_share_details (When nfs export exists., dict, {'anonymous_gid': 4294967294, 'anonymous_uid': 4294967294, 'creation_time': '2022-03-09 15:05:34.720000+00:00', 'default_access': 'NFSShareDefaultAccessEnum.NO_ACCESS', 'description': '', 'export_option': 1, 'export_paths': ['**.***.**.**:/dummy-share-123'], 'filesystem': {'UnityFileSystem': {'id': 'fs_id_1', 'name': 'fs_name_1'}}, 'host_accesses': 'None', 'id': 'NFSShare_14393', 'is_read_only': 'None', 'min_security': 'NFSShareSecurityEnum.SYS', 'modification_time': '2022-04-25 08:12:28.179000+00:00', 'name': 'dummy-share-123', 'nfs_owner_username': 'None', 'no_access_hosts': 'None', 'no_access_hosts_string': 'host1,**.***.*.*', 'path': '/', 'read_only_hosts': 'None', 'read_only_hosts_string': '', 'read_only_root_access_hosts': 'None', 'read_only_root_hosts_string': '', 'read_write_hosts': 'None', 'read_write_hosts_string': '', 'read_write_root_hosts_string': '', 'role': 'NFSShareRoleEnum.PRODUCTION', 'root_access_hosts': 'None', 'snap': 'None', 'type': 'NFSTypeEnum.NFS_SHARE', 'existed': True, 'nas_server': {'UnityNasServer': {'id': 'nas_id_1', 'name': 'dummy_nas_server'}}}) + Details of the nfs export. + + + anonymous_uid (, int, ) + User ID of the anonymous account + + + anonymous_gid (, int, ) + Group ID of the anonymous account + + + default_access (, str, ) + Default access level for all hosts that can access export + + + description (, str, ) + Description about the nfs export + + + id (, str, ) + ID of the nfs export + + + min_security (, str, ) + NFS enforced security type for users accessing an export + + + name (, str, ) + Name of the nfs export + + + no_access_hosts_string (, str, ) + Hosts with no access to the nfs export + + + read_only_hosts_string (, str, ) + Hosts with read-only access to the nfs export + + + read_only_root_hosts_string (, str, ) + Hosts with read-only for root user access to the nfs export + + + read_write_hosts_string (, str, ) + Hosts with read and write access to the nfs export + + + read_write_root_hosts_string (, str, ) + Hosts with read and write for root user access to export + + + type (, str, ) + NFS export type. i.e. filesystem or snapshot + + + export_paths (, list, ) + Export paths that can be used to mount and access export + + + filesystem (, dict, ) + Details of the filesystem on which nfs export is present + + + UnityFileSystem (, dict, ) + filesystem details + + + id (, str, ) + ID of the filesystem + + + name (, str, ) + Name of the filesystem + + + + + nas_server (, dict, ) + Details of the nas server + + + UnityNasServer (, dict, ) + NAS server details + + + id (, str, ) + ID of the nas server + + + name (, str, ) + Name of the nas server + + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Vivek Soni (@v-soni11) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/nfsserver.rst b/ansible_collections/dellemc/unity/docs/modules/nfsserver.rst new file mode 100644 index 000000000..0836bb63c --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/nfsserver.rst @@ -0,0 +1,242 @@ +.. _nfsserver_module: + + +nfsserver -- Manage NFS server on Unity storage system +====================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing the NFS server on the Unity storage system includes creating NFS server, getting NFS server details and deleting NFS server attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + nas_server_name (optional, str, None) + Name of the NAS server on which NFS server will be hosted. + + + nas_server_id (optional, str, None) + ID of the NAS server on which NFS server will be hosted. + + + nfs_server_id (optional, str, None) + ID of the NFS server. + + + host_name (optional, str, None) + Host name of the NFS server. + + + nfs_v4_enabled (optional, bool, None) + Indicates whether the NFSv4 is enabled on the NAS server. + + + is_secure_enabled (optional, bool, None) + Indicates whether the secure NFS is enabled. + + + kerberos_domain_controller_type (optional, str, None) + Type of Kerberos Domain Controller used for secure NFS service. + + + kerberos_domain_controller_username (optional, str, None) + Kerberos Domain Controller administrator username. + + + kerberos_domain_controller_password (optional, str, None) + Kerberos Domain Controller administrator password. + + + is_extended_credentials_enabled (optional, bool, None) + Indicates whether support for more than 16 unix groups in a Unix credential. + + + remove_spn_from_kerberos (optional, bool, True) + Indicates whether to remove the SPN from Kerberos Domain Controller. + + + state (True, str, None) + Define whether the NFS server should exist or not. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is supported. + - Modify operation for NFS Server is not supported. + - When *kerberos_domain_controller_type* is ``UNIX``, *kdc_type* in *nfs_server_details* output is displayed as ``null``. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + + - name: Create NFS server with kdctype as Windows + dellemc.unity.nfsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + host_name: "dummy_nas23" + is_secure_enabled: True + kerberos_domain_controller_type: "WINDOWS" + kerberos_domain_controller_username: "administrator" + kerberos_domain_controller_password: "Password123!" + is_extended_credentials_enabled: True + nfs_v4_enabled: True + state: "present" + + - name: Create NFS server with kdctype as Unix + dellemc.unity.nfsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + host_name: "dummy_nas23" + is_secure_enabled: True + kerberos_domain_controller_type: "UNIX" + is_extended_credentials_enabled: True + nfs_v4_enabled: True + state: "present" + + - name: Get NFS server details + dellemc.unity.nfsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + state: "present" + + - name: Delete NFS server + dellemc.unity.nfsserver: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + nas_server_name: "dummy_nas" + kerberos_domain_controller_username: "administrator" + kerberos_domain_controller_password: "Password123!" + unjoin_server_account: False + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +nfs_server_details (When NFS server exists, dict, {'credentials_cache_ttl': '0:15:00', 'existed': True, 'file_interfaces': {'UnityFileInterfaceList': [{'UnityFileInterface': {'hash': 8778980109421, 'id': 'if_37'}}]}, 'hash': 8778980109388, 'host_name': 'dummy_nas23.pie.lab.emc.com', 'id': 'nfs_51', 'is_extended_credentials_enabled': True, 'is_secure_enabled': True, 'kdc_type': 'KdcTypeEnum.WINDOWS', 'nas_server': {'UnityNasServer': {'hash': 8778980109412}}, 'nfs_v4_enabled': True, 'servicee_principal_name': None}) + Details of the NFS server. + + + credentials_cache_ttl (, str, ) + Credential cache refresh timeout. Resolution is in minutes. Default value is 15 minutes. + + + existed (, bool, ) + Indicates if NFS Server exists. + + + host_name (, str, ) + Host name of the NFS server. + + + id (, str, ) + Unique identifier of the NFS Server instance. + + + is_extended_credentials_enabled (, bool, ) + Indicates whether the NFS server supports more than 16 Unix groups in a Unix credential. + + + is_secure_enabled (, bool, ) + Indicates whether secure NFS is enabled on the NFS server. + + + kdc_type (, str, ) + Type of Kerberos Domain Controller used for secure NFS service. + + + nfs_v4_enabled (, bool, ) + Indicates whether NFSv4 is enabled on the NAS server. + + + servicee_principal_name (, str, ) + The Service Principal Name (SPN) for the NFS Server. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Meenakshi Dembi (@dembim) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/smbshare.rst b/ansible_collections/dellemc/unity/docs/modules/smbshare.rst new file mode 100644 index 000000000..697bda3ff --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/smbshare.rst @@ -0,0 +1,381 @@ +.. _smbshare_module: + + +smbshare -- Manage SMB shares on Unity storage system +===================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing SMB Shares on Unity 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 Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +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 root of the filesystem. + + Required for creation of the SMB share. + + + filesystem_id (optional, str, None) + The ID of the File System. + + Either *filesystem_name* or *filesystem_id* is required for creation of the SMB share for filesystem. + + If *filesystem_name* is specified, then *nas_server_name*/*nas_server_id* is required to uniquely identify the filesystem. + + Options *filesystem_name* and *filesystem_id* are mutually exclusive parameters. + + + snapshot_id (optional, str, None) + The ID of the Filesystem Snapshot. + + Either *snapshot_name* or *snapshot_id* is required for creation of the SMB share for a snapshot. + + If *snapshot_name* is specified, then *nas_server_name*/*nas_server_id* is required to uniquely identify the snapshot. + + Options *snapshot_name* and *snapshot_id* are mutually exclusive parameters. + + + nas_server_id (optional, str, None) + The ID of the NAS Server. + + It is not required if *share_id* is used. + + + filesystem_name (optional, str, None) + The Name of the File System. + + Either *filesystem_name* or *filesystem_id* is required for creation of the SMB share for filesystem. + + If *filesystem_name* is specified, then *nas_server_name*/*nas_server_id* is required to uniquely identify the filesystem. + + Options *filesystem_name* and *filesytem_id* are mutually exclusive parameters. + + + snapshot_name (optional, str, None) + The Name of the Filesystem Snapshot. + + Either *snapshot_name* or *snapshot_id* is required for creation of the SMB share for a snapshot. + + If *snapshot_name* is specified, then *nas_server_name*/*nas_server_id* is required to uniquely identify the snapshot. + + Options *snapshot_name* and *snapshot_id* are mutually exclusive parameters. + + + nas_server_name (optional, str, None) + The Name of the NAS Server. + + It is not required if *share_id* is used. + + Options *nas_server_name* and *nas_server_id* are mutually exclusive parameters. + + + 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 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 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. + + + 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. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - When ID/Name of the filesystem/snapshot is passed then *nas_server* is not required. If passed, then filesystem/snapshot should exist for the mentioned *nas_server*, else the task will fail. + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create SMB share for a filesystem + dellemc.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + share_name: "sample_smb_share" + filesystem_name: "sample_fs" + nas_server_id: "NAS_11" + path: "/sample_fs" + 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 + umask: "777" + state: "present" + - name: Modify Attributes of SMB share for a filesystem + dellemc.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + share_name: "sample_smb_share" + nas_server_name: "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.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + share_name: "sample_snap_smb_share" + snapshot_name: "sample_snapshot" + nas_server_id: "NAS_11" + path: "/sample_snapshot" + description: "Sample SMB share created for snapshot" + is_abe_enabled: True + is_branch_cache_enabled: True + is_continuous_availability_enabled: True + is_encryption_enabled: True + umask: "777" + state: "present" + - name: Modify Attributes of SMB share for a snapshot + dellemc.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + share_name: "sample_snap_smb_share" + snapshot_name: "sample_snapshot" + 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" + is_encryption_enabled: "False" + umask: "022" + state: "present" + - name: Get details of SMB share + dellemc.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + share_id: "{{smb_share_id}}" + state: "present" + - name: Delete SMB share + dellemc.unity.smbshare: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + 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., dict, {'creation_time': '2022-03-17 11:56:54.867000+00:00', 'description': '', 'existed': True, 'export_paths': ['\\\\multi-prot-pie.extreme1.com\\multi-prot-hui', '\\\\10.230.24.26\\multi-prot-hui'], 'filesystem': {'UnityFileSystem': {'hash': 8748426746492}}, 'filesystem_id': 'fs_140', 'filesystem_name': 'multi-prot-hui', 'hash': 8748426746588, 'id': 'SMBShare_20', 'is_abe_enabled': False, 'is_ace_enabled': False, 'is_branch_cache_enabled': False, 'is_continuous_availability_enabled': False, 'is_dfs_enabled': False, 'is_encryption_enabled': False, 'is_read_only': None, 'modified_time': '2022-03-17 11:56:54.867000+00:00', 'name': 'multi-prot-hui', 'nas_server_id': 'nas_5', 'nas_server_name': 'multi-prot', 'offline_availability': 'CifsShareOfflineAvailabilityEnum.NONE', 'path': '/', 'snap': None, 'type': 'CIFSTypeEnum.CIFS_SHARE', 'umask': '022'}) + The SMB share details. + + + id (, str, ) + The ID of the SMB share. + + + name (, str, sample_smb_share) + Name of the SMB share. + + + filesystem_id (, str, ) + The ID of the Filesystem. + + + filesystem_name (, str, ) + The Name of the filesystem + + + snapshot_id (, str, ) + The ID of the Snapshot. + + + snapshot_name (, str, ) + The Name of the Snapshot. + + + nas_server_id (, str, ) + The ID of the nas_server. + + + nas_server_name (, str, ) + The Name of the nas_server. + + + 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. + + + umask (, str, ) + Unix mask for the SMB share. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/snapshot.rst b/ansible_collections/dellemc/unity/docs/modules/snapshot.rst new file mode 100644 index 000000000..46b2aa997 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/snapshot.rst @@ -0,0 +1,292 @@ +.. _snapshot_module: + + +snapshot -- Manage snapshots on the Unity storage system +======================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing snapshots on the Unity storage system includes create snapshot, delete snapshot, update snapshot, get snapshot, map host and unmap host. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + snapshot_name (optional, str, None) + The name of the snapshot. + + Mandatory parameter for creating a snapshot. + + For all other operations either *snapshot_name* or *snapshot_id* is required. + + + vol_name (optional, str, None) + The name of the volume for which snapshot is created. + + For creation of a snapshot either *vol_name* or *cg_name* is required. + + Not required for other operations. + + + cg_name (optional, str, None) + The name of the Consistency Group for which snapshot is created. + + For creation of a snapshot either *vol_name* or *cg_name* is required. + + Not required for other operations. + + + snapshot_id (optional, str, None) + The id of the snapshot. + + For all operations other than creation either *snapshot_name* or *snapshot_id* is required. + + + auto_delete (optional, bool, None) + This option specifies whether the snapshot is auto deleted or not. + + If set to ``true``, snapshot will expire based on the pool auto deletion policy. + + If set to (false), snapshot will not be auto deleted based on the pool auto deletion policy. + + Option *auto_delete* can not be set to ``true``, if *expiry_time* is specified. + + If during creation neither *auto_delete* nor *expiry_time* is mentioned then snapshot will be created keeping *auto_delete* as ``true``. + + Once the *expiry_time* is set then snapshot cannot be assigned to the auto delete policy. + + + expiry_time (optional, str, None) + This option is for specifying the date and time after which the snapshot will expire. + + The time is to be mentioned in UTC timezone. + + The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits. + + + description (optional, str, None) + The additional information about the snapshot can be provided using this option. + + + new_snapshot_name (optional, str, None) + New name for the snapshot. + + + state (True, str, None) + The *state* option is used to mention the existence of the snapshot. + + + host_name (optional, str, None) + The name of the host. + + Either *host_name* or *host_id* is required to map or unmap a snapshot from a host. + + Snapshot can be attached to multiple hosts. + + + host_id (optional, str, None) + The id of the host. + + Either *host_name* or *host_id* is required to map or unmap a snapshot from a host. + + Snapshot can be attached to multiple hosts. + + + host_state (optional, str, None) + The *host_state* option is used to mention the existence of the host for snapshot. + + It is required when a snapshot is mapped or unmapped from host. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create a Snapshot for a CG + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + port: "{{port}}" + cg_name: "{{cg_name}}" + snapshot_name: "{{cg_snapshot_name}}" + description: "{{description}}" + auto_delete: False + state: "present" + + - name: Create a Snapshot for a volume with Host attached + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + port: "{{port}}" + vol_name: "{{vol_name}}" + snapshot_name: "{{vol_snapshot_name}}" + description: "{{description}}" + expiry_time: "04/15/2025 16:30" + host_name: "{{host_name}}" + host_state: "mapped" + state: "present" + + - name: Unmap a host for a Snapshot + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + port: "{{port}}" + snapshot_name: "{{vol_snapshot_name}}" + host_name: "{{host_name}}" + host_state: "unmapped" + state: "present" + + - name: Map snapshot to a host + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + port: "{{port}}" + snapshot_name: "{{vol_snapshot_name}}" + host_name: "{{host_name}}" + host_state: "mapped" + state: "present" + + - name: Update attributes of a Snapshot for a volume + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "{{vol_snapshot_name}}" + new_snapshot_name: "{{new_snapshot_name}}" + description: "{{new_description}}" + host_name: "{{host_name}}" + host_state: "unmapped" + state: "present" + + - name: Delete Snapshot of CG + dellemc.unity.snapshot: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + snapshot_name: "{{cg_snapshot_name}}" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +snapshot_details (When snapshot exists, dict, {'access_type': None, 'attached_wwn': None, 'creation_time': '2022-10-21 08:20:25.803000+00:00', 'creator_schedule': None, 'creator_type': 'SnapCreatorTypeEnum.USER_CUSTOM', 'creator_user': {'id': 'user_admin'}, 'description': 'Test snap creation', 'existed': True, 'expiration_time': None, 'hash': 8756689457056, 'hosts_list': [], 'id': '85899355291', 'io_limit_policy': None, 'is_auto_delete': True, 'is_modifiable': False, 'is_modified': False, 'is_read_only': True, 'is_system_snap': False, 'last_writable_time': None, 'lun': None, 'name': 'ansible_snap_cg_1_1', 'parent_snap': None, 'size': None, 'snap_group': None, 'state': 'SnapStateEnum.READY', 'storage_resource_id': 'res_95', 'storage_resource_name': 'CG_ansible_test_2_new'}) + Details of the snapshot. + + + is_auto_delete (, str, ) + Additional information mentioned for snapshot. + + + expiration_time (, str, ) + Date and time after which the snapshot will expire. + + + hosts_list (, dict, ) + Contains the name and id of the associated hosts. + + + id (, str, ) + Unique identifier of the snapshot instance. + + + name (, str, ) + The name of the snapshot. + + + storage_resource_name (, str, ) + Name of the storage resource for which the snapshot exists. + + + storage_resource_id (, str, ) + Id of the storage resource for which the snapshot exists. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/snapshotschedule.rst b/ansible_collections/dellemc/unity/docs/modules/snapshotschedule.rst new file mode 100644 index 000000000..4e9a37de2 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/snapshotschedule.rst @@ -0,0 +1,421 @@ +.. _snapshotschedule_module: + + +snapshotschedule -- Manage snapshot schedules on Unity storage system +===================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing snapshot schedules on Unity storage system includes creating new snapshot schedule, getting details of snapshot schedule, modifying attributes of snapshot schedule, and deleting snapshot schedule. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + name (optional, str, None) + The name of the snapshot schedule. + + Name is mandatory for a create operation. + + Specify either *name* or *id* (but not both) for any operation. + + + id (optional, str, None) + The ID of the snapshot schedule. + + + type (optional, str, None) + Type of the rule to be included in snapshot schedule. + + Type is mandatory for any create or modify operation. + + Once the snapshot schedule is created with one type it can be modified. + + + interval (optional, int, None) + Number of hours between snapshots. + + Applicable only when rule type is ``every_n_hours``. + + + hours_of_day (optional, list, None) + Hours of the day when the snapshot will be taken. + + Applicable only when rule type is ``every_day``. + + + day_interval (optional, int, None) + Number of days between snapshots. + + Applicable only when rule type is ``every_n_days``. + + + days_of_week (optional, list, None) + Days of the week for which the snapshot schedule rule applies. + + Applicable only when rule type is ``every_week``. + + + day_of_month (optional, int, None) + Day of the month for which the snapshot schedule rule applies. + + Applicable only when rule type is ``every_month``. + + Value should be [1, 31]. + + + hour (optional, int, None) + The hour when the snapshot will be taken. + + Applicable for ``every_n_days``, ``every_week``, ``every_month`` rule types. + + For create operation, if *hour* parameter is not specified, value will be taken as ``0``. + + Value should be [0, 23]. + + + minute (optional, int, None) + Minute offset from the hour when the snapshot will be taken. + + Applicable for all rule types. + + For a create operation, if *minute* parameter is not specified, value will be taken as ``0``. + + Value should be [0, 59]. + + + desired_retention (optional, int, None) + The number of days/hours for which snapshot will be retained. + + When *auto_delete* is ``true``, *desired_retention* cannot be specified. + + Maximum desired retention supported is 31 days or 744 hours. + + + retention_unit (optional, str, hours) + The retention unit for the snapshot. + + + auto_delete (optional, bool, None) + Indicates whether the system can automatically delete the snapshot. + + + state (True, str, None) + Define whether the snapshot schedule should exist or not. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - Snapshot schedule created through Ansible will have only one rule. + - Modification of rule type is not allowed. Within the same type, other parameters can be modified. + - If an existing snapshot schedule has more than 1 rule in it, only get and delete operation is allowed. + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create snapshot schedule (Rule Type - every_n_hours) + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_N_Hours_Testing" + type: "every_n_hours" + interval: 6 + desired_retention: 24 + state: "{{state_present}}" + + - name: Create snapshot schedule (Rule Type - every_day) + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_Day_Testing" + type: "every_day" + hours_of_day: + - 8 + - 14 + auto_delete: True + state: "{{state_present}}" + + - name: Create snapshot schedule (Rule Type - every_n_days) + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_N_Day_Testing" + type: "every_n_days" + day_interval: 2 + desired_retention: 16 + retention_unit: "days" + state: "{{state_present}}" + + - name: Create snapshot schedule (Rule Type - every_week) + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_Week_Testing" + type: "every_week" + days_of_week: + - MONDAY + - FRIDAY + hour: 12 + minute: 30 + desired_retention: 200 + state: "{{state_present}}" + + - name: Create snapshot schedule (Rule Type - every_month) + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_Month_Testing" + type: "every_month" + day_of_month: 17 + auto_delete: True + state: "{{state_present}}" + + - name: Get snapshot schedule details using name + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_N_Hours_Testing" + state: "{{state_present}}" + + - name: Get snapshot schedule details using id + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + id: "{{id}}" + state: "{{state_present}}" + + - name: Modify snapshot schedule details id + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + id: "{{id}}" + type: "every_n_hours" + interval: 8 + state: "{{state_present}}" + + - name: Modify snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_Day_Testing" + type: "every_day" + desired_retention: 200 + auto_delete: False + state: "{{state_present}}" + + - name: Delete snapshot schedule using id + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + id: "{{id}}" + state: "{{state_absent}}" + + - name: Delete snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{unispherehost}}" + validate_certs: "{{validate_certs}}" + username: "{{username}}" + password: "{{password}}" + name: "Ansible_Every_Day_Testing" + state: "{{state_absent}}" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +snapshot_schedule_details (When snapshot schedule exists, dict, {'existed': True, 'hash': 8742032390151, 'id': 'snapSch_63', 'is_default': False, 'is_modified': None, 'is_sync_replicated': False, 'luns': None, 'modification_time': '2021-12-14 21:37:47.905000+00:00', 'name': 'SS7_empty_hour_SS', 'rules': [{'access_type': 'FilesystemSnapAccessTypeEnum.CHECKPOINT', 'days_of_month': None, 'days_of_week': {'DayOfWeekEnumList': []}, 'existed': True, 'hash': 8742032280772, 'hours': [0], 'id': 'SchedRule_109', 'interval': 2, 'is_auto_delete': False, 'minute': 0, 'retention_time': 86400, 'retention_time_in_hours': 24, 'rule_type': 'every_n_days', 'type': 'ScheduleTypeEnum.N_DAYS_AT_HHMM'}], 'storage_resources': None, 'version': 'ScheduleVersionEnum.LEGACY'}) + Details of the snapshot schedule. + + + id (, str, ) + The system ID given to the snapshot schedule. + + + name (, str, ) + The name of the snapshot schedule. + + + luns (, dict, ) + Details of volumes for which snapshot schedule applied. + + + UnityLunList (, list, ) + List of volumes for which snapshot schedule applied. + + + UnityLun (, dict, ) + Detail of volume. + + + id (, str, ) + The system ID given to volume. + + + + + + rules (, list, ) + Details of rules that apply to snapshot schedule. + + + id (, str, ) + The system ID of the rule. + + + interval (, int, ) + Number of days or hours between snaps, depending on the rule type. + + + hours (, list, ) + Hourly frequency for the snapshot schedule rule. + + + minute (, int, ) + Minute frequency for the snapshot schedule rule. + + + days_of_week (, dict, ) + Days of the week for which the snapshot schedule rule applies. + + + DayOfWeekEnumList (, list, ) + Enumeration of days of the week. + + + + days_of_month (, list, ) + Days of the month for which the snapshot schedule rule applies. + + + retention_time (, int, ) + Period of time in seconds for which to keep the snapshot. + + + retention_time_in_hours (, int, ) + Period of time in hours for which to keep the snapshot. + + + rule_type (, str, ) + Type of the rule applied to snapshot schedule. + + + is_auto_delete (, bool, ) + Indicates whether the system can automatically delete the snapshot based on pool automatic-deletion thresholds. + + + + storage_resources (, dict, ) + Details of storage resources for which snapshot. schedule applied. + + + UnityStorageResourceList (, list, ) + List of storage resources for which snapshot schedule applied. + + + UnityStorageResource (, dict, ) + Detail of storage resource. + + + id (, str, ) + The system ID given to storage resource. + + + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Akash Shendge (@shenda1) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/storagepool.rst b/ansible_collections/dellemc/unity/docs/modules/storagepool.rst new file mode 100644 index 000000000..764f2a812 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/storagepool.rst @@ -0,0 +1,361 @@ +.. _storagepool_module: + + +storagepool -- Manage storage pool on Unity +=========================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing storage pool on Unity storage system contains the operations Get details of storage pool, Create a storage pool, Modify storage pool. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + pool_name (optional, str, None) + Name of the storage pool, unique in the storage system. + + + pool_id (optional, str, None) + Unique identifier of the pool instance. + + + new_pool_name (optional, str, None) + New name of the storage pool, unique in the storage system. + + + pool_description (optional, str, None) + The description of the storage pool. + + + fast_cache (optional, str, None) + Indicates whether the fast cache is enabled for the storage pool. + + ``Enabled`` - FAST Cache is enabled for the pool. + + ``Disabled`` - FAST Cache is disabled for the pool. + + + fast_vp (optional, str, None) + Indicates whether to enable scheduled data relocations for the pool. + + ``Enabled`` - Enabled scheduled data relocations for the pool. + + ``Disabled`` - Disabled scheduled data relocations for the pool. + + + raid_groups (optional, dict, None) + Parameters to create RAID group from the disks and add it to the pool. + + + disk_group_id (optional, str, None) + Id of the disk group. + + + disk_num (optional, int, None) + Number of disks. + + + raid_type (optional, str, None) + RAID group types or RAID levels. + + + stripe_width (optional, str, None) + RAID group stripe widths, including parity or mirror disks. + + + + alert_threshold (optional, int, None) + Threshold at which the system will generate alerts about the free space in the pool, specified as a percentage. + + Minimum threshold limit is 50. + + Maximum threshold limit is 84. + + + is_harvest_enabled (optional, bool, None) + Enable/Disable automatic deletion of snapshots based on pool space usage. + + + pool_harvest_high_threshold (optional, float, None) + Max threshold for space used in pool beyond which the system automatically starts deleting snapshots in the pool. + + Applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool. + + Minimum pool harvest high threshold value is 1. + + Maximum pool harvest high threshold value is 99. + + + pool_harvest_low_threshold (optional, float, None) + Min threshold for space used in pool below which the system automatically stops deletion of snapshots in the pool. + + Applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool. + + Minimum pool harvest low threshold value is 0. + + Maximum pool harvest low threshold value is 98. + + + is_snap_harvest_enabled (optional, bool, None) + Enable/Disable automatic deletion of snapshots based on pool space usage. + + + snap_harvest_high_threshold (optional, float, None) + Max threshold for space used in snapshot beyond which the system automatically starts deleting snapshots in the pool. + + Applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool. + + Minimum snap harvest high threshold value is 1. + + Maximum snap harvest high threshold value is 99. + + + snap_harvest_low_threshold (optional, float, None) + Min threshold for space used in snapshot below which the system will stop automatically deleting snapshots in the pool. + + Applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool. + + Minimum snap harvest low threshold value is 0. + + Maximum snap harvest low threshold value is 98. + + + pool_type (optional, str, None) + Indicates storage pool type. + + + state (True, str, None) + Define whether the storage pool should exist or not. + + ``Present`` - indicates that the storage pool should exist on the system. + + ``Absent`` - indicates that the storage pool should not exist on the system. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - Deletion of storage pool is not allowed through Ansible module. + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get Storage pool details using pool_name + dellemc.unity.storagepool: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + pool_name: "{{pool_name}}" + state: "present" + + - name: Get Storage pool details using pool_id + dellemc.unity.storagepool: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + pool_id: "{{pool_id}}" + state: "present" + + - name: Modify Storage pool attributes using pool_name + dellemc.unity.storagepool: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + pool_name: "{{pool_name}}" + new_pool_name: "{{new_pool_name}}" + pool_description: "{{pool_description}}" + fast_cache: "{{fast_cache_enabled}}" + fast_vp: "{{fast_vp_enabled}}" + state: "present" + + - name: Modify Storage pool attributes using pool_id + dellemc.unity.storagepool: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + pool_id: "{{pool_id}}" + new_pool_name: "{{new_pool_name}}" + pool_description: "{{pool_description}}" + fast_cache: "{{fast_cache_enabled}}" + fast_vp: "{{fast_vp_enabled}}" + state: "present" + + - name: Create a StoragePool + dellemc.unity.storagepool: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + pool_name: "Test" + pool_description: "test pool" + raid_groups: + disk_group_id : "dg_16" + disk_num : 2 + raid_type : "RAID10" + stripe_width : "BEST_FIT" + alert_threshold : 50 + is_harvest_enabled : True + pool_harvest_high_threshold : 60 + pool_harvest_low_threshold : 40 + is_snap_harvest_enabled : True + snap_harvest_high_threshold : 70 + snap_harvest_low_threshold : 50 + fast_vp: "enabled" + fast_cache: "enabled" + pool_type : "DYNAMIC" + state: "present" + + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the storage pool has changed. + + +storage_pool_details (When storage pool exists., dict, {'alert_threshold': 50, 'creation_time': '2022-03-08 14:05:32+00:00', 'description': '', 'drives': [{'disk_technology': 'SAS', 'id': 'dpe_disk_22', 'name': 'DPE Drive 22', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}, {'disk_technology': 'SAS', 'id': 'dpe_disk_23', 'name': 'DPE Drive 23', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}, {'disk_technology': 'SAS', 'id': 'dpe_disk_24', 'name': 'DPE Drive 24', 'size': 590860984320, 'tier_type': 'PERFORMANCE'}], 'existed': True, 'harvest_state': 'UsageHarvestStateEnum.IDLE', 'hash': 8744642897210, 'health': {'UnityHealth': {'hash': 8744642799842}}, 'id': 'pool_280', 'is_all_flash': False, 'is_empty': False, 'is_fast_cache_enabled': False, 'is_fast_vp_enabled': False, 'is_harvest_enabled': True, 'is_snap_harvest_enabled': True, 'metadata_size_subscribed': 105763569664, 'metadata_size_used': 57176752128, 'name': 'test_pool', 'object_id': 12884902146, 'pool_fast_vp': {'UnityPoolFastVp': {'hash': 8744647518980}}, 'pool_space_harvest_high_threshold': 59.0, 'pool_space_harvest_low_threshold': 40.0, 'pool_type': 'StoragePoolTypeEnum.DYNAMIC', 'raid_type': 'RaidTypeEnum.RAID10', 'rebalance_progress': None, 'size_free': 470030483456, 'size_free_with_unit': '437.75 GB', 'size_subscribed': 447215820800, 'size_subscribed_with_unit': '416.5 GB', 'size_total': 574720311296, 'size_total_with_unit': '535.25 GB', 'size_used': 76838068224, 'size_used_with_unit': '71.56 GB', 'snap_size_subscribed': 128851369984, 'snap_size_subscribed_with_unit': '120.0 GB', 'snap_size_used': 2351104, 'snap_size_used_with_unit': '2.24 MB', 'snap_space_harvest_high_threshold': 80.0, 'snap_space_harvest_low_threshold': 60.0, 'tiers': {'UnityPoolTierList': [{'disk_count': [0, 3, 0], 'existed': True, 'hash': 8744643017382, 'name': ['Extreme Performance', 'Performance', 'Capacity'], 'pool_units': [None, {'UnityPoolUnitList': [{'UnityPoolUnit': {'hash': 8744642786759, 'id': 'rg_4'}}, {'UnityPoolUnit': {'hash': 8744642786795, 'id': 'rg_5'}}]}, None], 'raid_type': ['RaidTypeEnum.NONE', 'RaidTypeEnum.RAID10', 'RaidTypeEnum.NONE'], 'size_free': [0, 470030483456, 0], 'size_moving_down': [0, 0, 0], 'size_moving_up': [0, 0, 0], 'size_moving_within': [0, 0, 0], 'size_total': [0, 574720311296, 0], 'size_used': [0, 104689827840, 0], 'stripe_width': [None, 'RaidStripeWidthEnum._2', None], 'tier_type': ['TierTypeEnum.EXTREME_PERFORMANCE', 'TierTypeEnum.PERFORMANCE', 'TierTypeEnum.CAPACITY']}]}}) + The storage pool details. + + + id (, str, ) + Pool id, unique identifier of the pool. + + + name (, str, ) + Pool name, unique in the storage system. + + + is_fast_cache_enabled (, bool, ) + Indicates whether the fast cache is enabled for the storage pool. true - FAST Cache is enabled for the pool. false - FAST Cache is disabled for the pool. + + + is_fast_vp_enabled (, bool, ) + Indicates whether to enable scheduled data relocations for the storage pool. true - Enabled scheduled data relocations for the pool. false - Disabled scheduled data relocations for the pool. + + + size_free_with_unit (, str, ) + Indicates size_free with its appropriate unit in human readable form. + + + size_subscribed_with_unit (, str, ) + Indicates size_subscribed with its appropriate unit in human readable form. + + + size_total_with_unit (, str, ) + Indicates size_total with its appropriate unit in human readable form. + + + size_used_with_unit (, str, ) + Indicates size_used with its appropriate unit in human readable form. + + + snap_size_subscribed_with_unit (, str, ) + Indicates snap_size_subscribed with its appropriate unit in human readable form. + + + snap_size_used_with_unit (, str, ) + Indicates snap_size_used with its appropriate unit in human readable form. + + + drives (, list, ) + Indicates information about the drives associated with the storage pool. + + + id (, str, ) + Unique identifier of the drive. + + + name (, str, ) + Indicates name of the drive. + + + size (, str, ) + Indicates size of the drive. + + + disk_technology (, str, ) + Indicates disk technology of the drive. + + + tier_type (, str, ) + Indicates tier type of the drive. + + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Ambuj Dubey (@AmbujDube) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/tree_quota.rst b/ansible_collections/dellemc/unity/docs/modules/tree_quota.rst new file mode 100644 index 000000000..285ab9d79 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/tree_quota.rst @@ -0,0 +1,310 @@ +.. _tree_quota_module: + + +tree_quota -- Manage quota tree on the Unity storage system +=========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing Quota tree on the Unity storage system includes Create quota tree, Get quota tree, Modify quota tree and Delete quota tree. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + filesystem_name (optional, str, None) + The name of the filesystem for which quota tree is created. + + For creation or modification of a quota tree either *filesystem_name* or *filesystem_id* is required. + + + filesystem_id (optional, str, None) + The ID of the filesystem for which the quota tree is created. + + For creation of a quota tree either *filesystem_id* or *filesystem_name* is required. + + + nas_server_name (optional, str, None) + The name of the NAS server in which the filesystem is created. + + For creation of a quota tree either *nas_server_name* or *nas_server_id* is required. + + + nas_server_id (optional, str, None) + The ID of the NAS server in which the filesystem is created. + + For creation of a quota tree either *filesystem_id* or *filesystem_name* is required. + + + tree_quota_id (optional, str, None) + The ID of the quota tree. + + Either *tree_quota_id* or *path* to quota tree is required to view/modify/delete quota tree. + + + path (optional, str, None) + The path to the quota tree. + + Either *tree_quota_id* or *path* to quota tree is required to create/view/modify/delete a quota tree. + + Path must start with a forward slash '/'. + + + hard_limit (optional, int, None) + Hard limitation for a quota tree on the total space available. If exceeded, users in quota tree cannot write data. + + Value ``0`` implies no limit. + + One of the values of *soft_limit* and *hard_limit* can be ``0``, however, both cannot be both ``0`` during creation of a quota tree. + + + soft_limit (optional, int, None) + Soft limitation for a quota tree on the total space available. If exceeded, notification will be sent to users in the quota tree for the grace period mentioned, beyond which users cannot use space. + + Value ``0`` implies no limit. + + Both *soft_limit* and *hard_limit* cannot be ``0`` during creation of quota tree. + + + cap_unit (optional, str, None) + Unit of *soft_limit* and *hard_limit* size. + + It defaults to ``GB`` if not specified. + + + description (optional, str, None) + Description of a quota tree. + + + state (True, str, None) + The state option is used to mention the existence of the filesystem quota tree. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get quota tree details by quota tree id + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + tree_quota_id: "treequota_171798700679_10" + state: "present" + + - name: Get quota tree details by quota tree path + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "fs_2171" + nas_server_id: "nas_21" + path: "/test" + state: "present" + + - name: Create quota tree for a filesystem with filesystem id + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + hard_limit: 6 + cap_unit: "TB" + soft_limit: 5 + path: "/test_new" + state: "present" + + - name: Create quota tree for a filesystem with filesystem name + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "Test_filesystem" + nas_server_name: "lglad068" + hard_limit: 6 + cap_unit: "TB" + soft_limit: 5 + path: "/test_new" + state: "present" + + - name: Modify quota tree limit usage by quota tree path + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + path: "/test_new" + hard_limit: 10 + cap_unit: "TB" + soft_limit: 8 + state: "present" + + - name: Modify quota tree by quota tree id + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + tree_quota_id: "treequota_171798700679_10" + hard_limit: 12 + cap_unit: "TB" + soft_limit: 10 + state: "present" + + - name: Delete quota tree by quota tree id + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + tree_quota_id: "treequota_171798700679_10" + state: "absent" + + - name: Delete quota tree by path + dellemc.unity.tree_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + path: "/test_new" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +get_tree_quota_details (When quota tree exists, dict, {'description': '', 'existed': True, 'filesystem': {'UnityFileSystem': {'hash': 8788549469862, 'id': 'fs_137', 'name': 'test', 'nas_server': {'id': 'nas_1', 'name': 'lglad072'}}}, 'gp_left': None, 'hard_limit': '6.0 TB', 'hash': 8788549497558, 'id': 'treequota_171798694897_1', 'path': 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', 'size_used': 0, 'soft_limit': '5.0 TB', 'state': 0}) + Details of the quota tree. + + + filesystem (, dict, ) + Filesystem details for which the quota tree is created. + + + UnityFileSystem (, dict, ) + Filesystem details for which the quota tree is created. + + + id (, str, ) + ID of the filesystem for which the quota tree is create. + + + + + description (, str, ) + Description of the quota tree. + + + path (, str, ) + Path to quota tree. A valid path must start with a forward slash '/'. It is mandatory while creating a quota tree. + + + hard_limit (, int, ) + Hard limit of quota tree. If the quota tree's space usage exceeds the hard limit, users in quota tree cannot write data. + + + soft_limit (, int, ) + Soft limit of the quota tree. If the quota tree's space usage exceeds the soft limit, the storage system starts to count down based on the specified grace period. + + + id (, str, ) + Quota tree ID. + + + size_used (, int, ) + Size of used space in the filesystem by the user files. + + + gp_left (, int, ) + The grace period left after the soft limit for the user quota is exceeded. + + + state (, int, ) + State of the quota tree. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Spandita Panigrahi (@panigs7) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/user_quota.rst b/ansible_collections/dellemc/unity/docs/modules/user_quota.rst new file mode 100644 index 000000000..7d0bbb808 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/user_quota.rst @@ -0,0 +1,456 @@ +.. _user_quota_module: + + +user_quota -- Manage user quota on the Unity storage system +=========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing User Quota on the Unity storage system includes Create user quota, Get user quota, Modify user quota, Delete user quota, Create user quota for quota tree, Modify user quota for quota tree and Delete user quota for quota tree. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + filesystem_name (optional, str, None) + The name of the filesystem for which the user quota is created. + + For creation of a user quota either *filesystem_name* or *filesystem_id* is required. + + + filesystem_id (optional, str, None) + The ID of the filesystem for which the user quota is created. + + For creation of a user quota either *filesystem_id* or *filesystem_name* is required. + + + nas_server_name (optional, str, None) + The name of the NAS server in which the filesystem is created. + + For creation of a user quota either *nas_server_name* or *nas_server_id* is required. + + + nas_server_id (optional, str, None) + The ID of the NAS server in which the filesystem is created. + + For creation of a user quota either *filesystem_id* or *filesystem_name* is required. + + + hard_limit (optional, int, None) + Hard limitation for a user on the total space available. If exceeded, user cannot write data. + + Value ``0`` implies no limit. + + One of the values of *soft_limit* and *hard_limit* can be ``0``, however, both cannot be ``0`` during creation or modification of user quota. + + + soft_limit (optional, int, None) + Soft limitation for a user on the total space available. If exceeded, notification will be sent to the user for the grace period mentioned, beyond which the user cannot use space. + + Value ``0`` implies no limit. + + Both *soft_limit* and *hard_limit* cannot be ``0`` during creation or modification of user quota. + + + cap_unit (optional, str, None) + Unit of *soft_limit* and *hard_limit* size. + + It defaults to ``GB`` if not specified. + + + user_type (optional, str, None) + Type of user creating a user quota. + + Mandatory while creating or modifying user quota. + + + win_domain (optional, str, None) + Fully qualified or short domain name for Windows user type. + + Mandatory when *user_type* is ``Windows``. + + + user_name (optional, str, None) + User name of the user quota when *user_type* is ``Windows`` or ``Unix``. + + Option *user_name* must be specified along with *win_domain* when *user_type* is ``Windows``. + + + uid (optional, str, None) + User ID of the user quota. + + + user_quota_id (optional, str, None) + User quota ID generated after creation of a user quota. + + + tree_quota_id (optional, str, None) + The ID of the quota tree. + + Either *tree_quota_id* or *path* to quota tree is required to create/modify/delete user quota for a quota tree. + + + path (optional, str, None) + The path to the quota tree. + + Either *tree_quota_id* or *path* to quota tree is required to create/modify/delete user quota for a quota tree. + + Path must start with a forward slash '/'. + + + state (True, str, None) + The *state* option is used to mention the existence of the user quota. + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Get user quota details by user quota id + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + user_quota_id: "userquota_171798700679_0_123" + state: "present" + + - name: Get user quota details by user quota uid/user name + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "fs_2171" + nas_server_id: "nas_21" + user_name: "test" + state: "present" + + - name: Create user quota for a filesystem with filesystem id + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + hard_limit: 6 + cap_unit: "TB" + soft_limit: 5 + uid: "111" + state: "present" + + - name: Create user quota for a filesystem with filesystem name + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_name: "Test_filesystem" + nas_server_name: "lglad068" + hard_limit: 6 + cap_unit: "TB" + soft_limit: 5 + uid: "111" + state: "present" + + - name: Modify user quota limit usage by user quota id + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + user_quota_id: "userquota_171798700679_0_123" + hard_limit: 10 + cap_unit: "TB" + soft_limit: 8 + state: "present" + + - name: Modify user quota by filesystem id and user quota uid/user_name + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + user_type: "Windows" + win_domain: "prod" + user_name: "sample" + hard_limit: 12 + cap_unit: "TB" + soft_limit: 10 + state: "present" + + - name: Delete user quota + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + win_domain: "prod" + user_name: "sample" + state: "absent" + + - name: Create user quota of a quota tree + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + tree_quota_id: "treequota_171798700679_4" + user_type: "Windows" + win_domain: "prod" + user_name: "sample" + soft_limit: 9 + cap_unit: "TB" + state: "present" + + - name: Create user quota of a quota tree by quota tree path + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + path: "/sample" + user_type: "Unix" + user_name: "test" + hard_limit: 2 + cap_unit: "TB" + state: "present" + + - name: Modify user quota of a quota tree + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + tree_quota_id: "treequota_171798700679_4" + user_type: "Windows" + win_domain: "prod" + user_name: "sample" + soft_limit: 10 + cap_unit: "TB" + state: "present" + + - name: Modify user quota of a quota tree by quota tree path + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + path: "/sample" + user_type: "Windows" + win_domain: "prod" + user_name: "sample" + hard_limit: 12 + cap_unit: "TB" + state: "present" + + - name: Delete user quota of a quota tree by quota tree path + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + filesystem_id: "fs_2171" + path: "/sample" + win_domain: "prod" + user_name: "sample" + state: "absent" + + - name: Delete user quota of a quota tree by quota tree id + dellemc.unity.user_quota: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + tree_quota_id: "treequota_171798700679_4" + win_domain: "prod" + user_name: "sample" + state: "absent" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +get_user_quota_details (When user quota exists, dict, {'existed': True, 'filesystem': {'UnityFileSystem': {'hash': 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', 'id': 'fs_120', 'name': 'nfs-multiprotocol', 'nas_server': {'id': 'nas_1', 'name': 'lglad072'}}}, 'gp_left': None, 'hard_limit': '10.0 GB', 'hard_ratio': None, 'hash': 8752448438089, 'id': 'userquota_171798694698_0_60000', 'size_used': 0, 'soft_limit': '10.0 GB', 'soft_ratio': None, 'state': 0, 'tree_quota': None, 'uid': 60000, 'unix_name': None, 'windows_names': None, 'windows_sids': None}) + Details of the user quota. + + + filesystem (, dict, ) + Filesystem details for which the user quota is created. + + + UnityFileSystem (, dict, ) + Filesystem details for which the user quota is created. + + + id (, str, ) + ID of the filesystem for which the user quota is created. + + + name (, str, ) + Name of filesystem. + + + nas_server (, dict, ) + Nasserver details where filesystem is created. + + + name (, str, ) + Name of nasserver. + + + id (, str, ) + ID of nasserver. + + + + + + tree_quota (, dict, ) + Quota tree details for which the user quota is created. + + + UnityTreeQuota (, dict, ) + Quota tree details for which the user quota is created. + + + id (, str, ) + ID of the quota tree. + + + path (, str, ) + Path to quota tree. + + + + + gp_left (, int, ) + The grace period left after the soft limit for the user quota is exceeded. + + + hard_limit (, int, ) + Hard limitation for a user on the total space available. If exceeded, user cannot write data. + + + hard_ratio (, str, ) + The hard ratio is the ratio between the hard limit size of the user quota and the amount of storage actually consumed. + + + soft_limit (, int, ) + Soft limitation for a user on the total space available. If exceeded, notification will be sent to user for the grace period mentioned, beyond which user cannot use space. + + + soft_ratio (, str, ) + The soft ratio is the ratio between the soft limit size of the user quota and the amount of storage actually consumed. + + + id (, str, ) + User quota ID. + + + size_used (, int, ) + Size of used space in the filesystem by the user files. + + + state (, int, ) + State of the user quota. + + + uid (, int, ) + User ID of the user. + + + unix_name (, str, ) + Unix user name for this user quota's uid. + + + windows_names (, str, ) + Windows user name that maps to this quota's uid. + + + windows_sids (, str, ) + Windows SIDs that maps to this quota's uid + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Spandita Panigrahi (@panigs7) <ansible.team@dell.com> + diff --git a/ansible_collections/dellemc/unity/docs/modules/volume.rst b/ansible_collections/dellemc/unity/docs/modules/volume.rst new file mode 100644 index 000000000..ed4c5f202 --- /dev/null +++ b/ansible_collections/dellemc/unity/docs/modules/volume.rst @@ -0,0 +1,381 @@ +.. _volume_module: + + +volume -- Manage volume on Unity storage system +=============================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Managing volume on Unity storage system includes- Create new volume, Modify volume attributes, Map Volume to host, Unmap volume to host, Display volume details, Delete volume. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- A Dell Unity Storage device version 5.1 or later. +- Ansible-core 2.12 or later. +- Python 3.9, 3.10 or 3.11. +- Storops Python SDK 1.2.11. + + + +Parameters +---------- + + vol_name (optional, str, None) + The name of the volume. Mandatory only for create operation. + + + vol_id (optional, str, None) + The id of the volume. + + It can be used only for get, modify, map/unmap host, or delete operation. + + + pool_name (optional, str, None) + This is the name of the pool where the volume will be created. + + Either the *pool_name* or *pool_id* must be provided to create a new volume. + + + pool_id (optional, str, None) + This is the id of the pool where the volume will be created. + + Either the *pool_name* or *pool_id* must be provided to create a new volume. + + + size (optional, int, None) + The size of the volume. + + + cap_unit (optional, str, None) + The unit of the volume size. It defaults to ``GB``, if not specified. + + + description (optional, str, None) + Description about the volume. + + Description can be removed by passing empty string (""). + + + snap_schedule (optional, str, None) + Snapshot schedule assigned to the volume. + + Add/Remove/Modify the snapshot schedule for the volume. + + + compression (optional, bool, None) + Boolean variable, Specifies whether or not to enable compression. Compression is supported only for thin volumes. + + + advanced_dedup (optional, bool, None) + Boolean variable, Indicates whether or not to enable advanced deduplication. + + Compression should be enabled to enable advanced deduplication. + + It can only be enabled on the all flash high end platforms. + + Deduplicated data will remain as is even after advanced deduplication is disabled. + + + is_thin (optional, bool, None) + Boolean variable, Specifies whether or not it is a thin volume. + + The value is set as ``true`` by default if not specified. + + + sp (optional, str, None) + Storage Processor for this volume. + + + io_limit_policy (optional, str, None) + IO limit policy associated with this volume. Once it is set, it cannot be removed through ansible module but it can be changed. + + + host_name (optional, str, None) + Name of the host to be mapped/unmapped with this volume. + + Either *host_name* or *host_id* can be specified in one task along with *mapping_state*. + + + host_id (optional, str, None) + ID of the host to be mapped/unmapped with this volume. + + Either *host_name* or *host_id* can be specified in one task along with *mapping_state*. + + + hlu (optional, int, None) + Host Lun Unit to be mapped/unmapped with this volume. + + It is an optional parameter, hlu can be specified along with *host_name* or *host_id* and *mapping_state*. + + If *hlu* is not specified, unity will choose it automatically. The maximum value supported is ``255``. + + + mapping_state (optional, str, None) + State of host access for volume. + + + new_vol_name (optional, str, None) + New name of the volume for rename operation. + + + tiering_policy (optional, str, None) + Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. + + + state (True, str, None) + State variable to determine whether volume will exist or not. + + + hosts (optional, list, None) + Name of hosts for mapping to a volume. + + + host_name (optional, str, None) + Name of the host. + + + host_id (optional, str, None) + ID of the host. + + + hlu (optional, str, None) + Host Lun Unit to be mapped/unmapped with this volume. + + It is an optional parameter, *hlu* can be specified along with *host_name* or *host_id* and *mapping_state*. + + If *hlu* is not specified, unity will choose it automatically. The maximum value supported is ``255``. + + + + unispherehost (True, str, None) + IP or FQDN of the Unity management server. + + + username (True, str, None) + The username of the Unity management server. + + + password (True, str, None) + The password of the Unity management server. + + + validate_certs (optional, bool, True) + Boolean variable to specify whether or not to validate SSL certificate. + + ``true`` - Indicates that the SSL certificate should be verified. + + ``false`` - Indicates that the SSL certificate should not be verified. + + + port (optional, int, 443) + Port number through which communication happens with Unity management server. + + + + + +Notes +----- + +.. note:: + - The *check_mode* is not supported. + - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Create Volume + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_name: "{{vol_name}}" + description: "{{description}}" + pool_name: "{{pool}}" + size: 2 + cap_unit: "{{cap_GB}}" + is_thin: True + compression: True + advanced_dedup: True + state: "{{state_present}}" + + - name: Expand Volume by volume id + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_id: "{{vol_id}}" + size: 5 + cap_unit: "{{cap_GB}}" + state: "{{state_present}}" + + - name: Modify Volume, map host by host_name + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_name: "{{vol_name}}" + host_name: "{{host_name}}" + hlu: 5 + mapping_state: "{{state_mapped}}" + state: "{{state_present}}" + + - name: Modify Volume, unmap host mapping by host_name + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_name: "{{vol_name}}" + host_name: "{{host_name}}" + mapping_state: "{{state_unmapped}}" + state: "{{state_present}}" + + - name: Map multiple hosts to a Volume + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_id: "{{vol_id}}" + hosts: + - host_name: "10.226.198.248" + hlu: 1 + - host_id: "Host_929" + hlu: 2 + mapping_state: "mapped" + state: "present" + + - name: Modify Volume attributes + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_name: "{{vol_name}}" + new_vol_name: "{{new_vol_name}}" + tiering_policy: "AUTOTIER" + compression: True + is_thin: True + advanced_dedup: True + state: "{{state_present}}" + + - name: Delete Volume by vol name + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_name: "{{vol_name}}" + state: "{{state_absent}}" + + - name: Delete Volume by vol id + dellemc.unity.volume: + unispherehost: "{{unispherehost}}" + username: "{{username}}" + password: "{{password}}" + validate_certs: "{{validate_certs}}" + vol_id: "{{vol_id}}" + state: "{{state_absent}}" + + + +Return Values +------------- + +changed (always, bool, True) + Whether or not the resource has changed. + + +volume_details (When volume exists, dict, {'current_node': 'NodeEnum.SPB', 'data_reduction_percent': 0, 'data_reduction_ratio': 1.0, 'data_reduction_size_saved': 0, 'default_node': 'NodeEnum.SPB', 'description': None, 'effective_io_limit_max_iops': None, 'effective_io_limit_max_kbps': None, 'existed': True, 'family_base_lun': {'UnityLun': {'hash': 8774954523796, 'id': 'sv_27'}}, 'family_clone_count': 0, 'hash': 8774954522426, 'health': {'UnityHealth': {'hash': 8774954528278}}, 'host_access': [{'accessMask': 'PRODUCTION', 'hlu': 0, 'id': 'Host_75', 'name': '10.226.198.250'}], 'id': 'sv_27', 'io_limit_policy': None, 'is_advanced_dedup_enabled': False, 'is_compression_enabled': None, 'is_data_reduction_enabled': False, 'is_replication_destination': False, 'is_snap_schedule_paused': False, 'is_thin_clone': False, 'is_thin_enabled': False, 'metadata_size': 4294967296, 'metadata_size_allocated': 4026531840, 'name': 'VSI-UNITY-test-task', 'per_tier_size_used': [111400714240, 0, 0], 'pool': {'id': 'pool_3', 'name': 'Extreme_Perf_tier'}, 'size_allocated': 107374182400, 'size_total': 107374182400, 'size_total_with_unit': '100.0 GB', 'size_used': None, 'snap_count': 0, 'snap_schedule': None, 'snap_wwn': '60:06:01:60:5C:F0:50:00:94:3E:91:4D:51:5A:4F:97', 'snaps_size': 0, 'snaps_size_allocated': 0, 'storage_resource': {'UnityStorageResource': {'hash': 8774954518887}}, 'tiering_policy': 'TieringPolicyEnum.AUTOTIER_HIGH', 'type': 'LUNTypeEnum.VMWARE_ISCSI', 'wwn': '60:06:01:60:5C:F0:50:00:00:B5:95:61:2E:34:DB:B2'}) + Details of the volume. + + + id (, str, ) + The system generated ID given to the volume. + + + name (, str, ) + Name of the volume. + + + description (, str, ) + Description about the volume. + + + is_data_reduction_enabled (, bool, ) + Whether or not compression enabled on this volume. + + + size_total_with_unit (, str, ) + Size of the volume with actual unit. + + + snap_schedule (, dict, ) + Snapshot schedule applied to this volume. + + + tiering_policy (, str, ) + Tiering policy applied to this volume. + + + current_sp (, str, ) + Current storage processor for this volume. + + + pool (, dict, ) + The pool in which this volume is allocated. + + + host_access (, list, ) + Host mapped to this volume. + + + io_limit_policy (, dict, ) + IO limit policy associated with this volume. + + + wwn (, str, ) + The world wide name of this volume. + + + is_thin_enabled (, bool, ) + Indicates whether thin provisioning is enabled for this volume. + + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Arindam Datta (@arindam-emc) <ansible.team@dell.com> +- Pavan Mudunuri(@Pavan-Mudunuri) <ansible.team@dell.com> + |