diff --git a/MODULE-LICENSE b/MODULE-LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/MODULE-LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md index b4002a0..ab9e288 100644 --- a/README.md +++ b/README.md @@ -86,4 +86,4 @@ The modules are written in such a way that all requests are idempotent and hence ## License -The Ansible collection for PowerFlex is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerflex/blob/main/LICENSE) for the full terms. Ansible modules and modules utilities that are part of the Ansible collection for PowerFlex are released and licensed under the Apache 2.0 license. See [MODULE-LICENSE](https://github.com/dell/ansible-powerflex/blob/main/MODULE-LICENSE) for the full terms. \ No newline at end of file +The Ansible collection for PowerFlex is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerflex/blob/main/LICENSE) for the full terms. \ No newline at end of file diff --git a/docs/ADOPTERS.md b/docs/ADOPTERS.md index 826b5cd..91e2224 100644 --- a/docs/ADOPTERS.md +++ b/docs/ADOPTERS.md @@ -1,11 +1 @@ - - # List of adopters diff --git a/docs/BRANCHING.md b/docs/BRANCHING.md index e244df7..5a45d07 100644 --- a/docs/BRANCHING.md +++ b/docs/BRANCHING.md @@ -1,13 +1,3 @@ - - # Branching strategy Ansible modules for Dell PowerFlex 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. diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index cfc4993..f9bc264 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,13 +1,3 @@ - - # Code of conduct - contributor covenant ## Our pledge diff --git a/docs/COMMITTER_GUIDE.md b/docs/COMMITTER_GUIDE.md index 8af0752..d66d335 100644 --- a/docs/COMMITTER_GUIDE.md +++ b/docs/COMMITTER_GUIDE.md @@ -1,13 +1,3 @@ - - # 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. diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index f3e0e1c..5bbd2cb 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -1,13 +1,3 @@ - - # Installation and execution of Ansible modules for Dell PowerFlex ## Installation of SDK diff --git a/docs/ISSUE_TRIAGE.md b/docs/ISSUE_TRIAGE.md index 3172161..22a7d99 100644 --- a/docs/ISSUE_TRIAGE.md +++ b/docs/ISSUE_TRIAGE.md @@ -1,13 +1,3 @@ - - # 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. diff --git a/docs/MAINTAINERS.md b/docs/MAINTAINERS.md index 6f0c610..9836541 100644 --- a/docs/MAINTAINERS.md +++ b/docs/MAINTAINERS.md @@ -1,13 +1,3 @@ - - # Maintainers * Bhavneet Sharma (Bhavneet-Sharma) * Jennifer John (Jennifer-John) diff --git a/docs/MAINTAINER_GUIDE.md b/docs/MAINTAINER_GUIDE.md index 2832c97..236a6c4 100644 --- a/docs/MAINTAINER_GUIDE.md +++ b/docs/MAINTAINER_GUIDE.md @@ -1,13 +1,3 @@ - - # Maintainer guidelines As a Maintainer of this project you have the responsibility of keeping true to the vision of the project with a 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. diff --git a/docs/SECURITY.md b/docs/SECURITY.md index b2de265..a5c64e3 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -1,13 +1,3 @@ - - # Security policy The Ansible modules for Dell PowerFlex repository are inspected for security vulnerabilities via blackduck scans and static code analysis. diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md index 26e6f15..ba6a826 100644 --- a/docs/SUPPORT.md +++ b/docs/SUPPORT.md @@ -1,12 +1,2 @@ - - ## Support For all your support needs you can interact with us on [GitHub](https://github.com/dell/ansible-powerflex) by creating a [GitHub Issue](https://github.com/dell/ansible-powerflex/issues) or through the [Ansible Community](https://www.dell.com/community/Automation/bd-p/Automation). diff --git a/galaxy.yml b/galaxy.yml index 1f6a62c..bd62ae5 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -43,7 +43,6 @@ description: Ansible modules for PowerFlex # This key is mutually exclusive with 'license_file' license: - GPL-3.0-or-later - - Apache-2.0 # A list of tags you want to associate with the collection # for indexing/searching. diff --git a/plugins/doc_fragments/powerflex.py b/plugins/doc_fragments/powerflex.py index b6d8626..9b14eba 100644 --- a/plugins/doc_fragments/powerflex.py +++ b/plugins/doc_fragments/powerflex.py @@ -1,5 +1,5 @@ # Copyright: (c) 2024, Dell Technologies. -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type diff --git a/plugins/module_utils/storage/dell/libraries/configuration.py b/plugins/module_utils/storage/dell/libraries/configuration.py index b7ca3ec..cd60b95 100644 --- a/plugins/module_utils/storage/dell/libraries/configuration.py +++ b/plugins/module_utils/storage/dell/libraries/configuration.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) diff --git a/plugins/module_utils/storage/dell/libraries/powerflex_base.py b/plugins/module_utils/storage/dell/libraries/powerflex_base.py index 0cfb265..cbea621 100644 --- a/plugins/module_utils/storage/dell/libraries/powerflex_base.py +++ b/plugins/module_utils/storage/dell/libraries/powerflex_base.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) diff --git a/plugins/module_utils/storage/dell/logging_handler.py b/plugins/module_utils/storage/dell/logging_handler.py index 7436cbb..419d0f4 100644 --- a/plugins/module_utils/storage/dell/logging_handler.py +++ b/plugins/module_utils/storage/dell/logging_handler.py @@ -1,5 +1,5 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Custom rotating file handler for PowerFlex""" diff --git a/plugins/module_utils/storage/dell/utils.py b/plugins/module_utils/storage/dell/utils.py index da603e6..e1ba595 100644 --- a/plugins/module_utils/storage/dell/utils.py +++ b/plugins/module_utils/storage/dell/utils.py @@ -1,5 +1,5 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function diff --git a/plugins/modules/device.py b/plugins/modules/device.py index e833531..f030b40 100644 --- a/plugins/modules/device.py +++ b/plugins/modules/device.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2021, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing device on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/fault_set.py b/plugins/modules/fault_set.py index bfa926d..54f9f1d 100644 --- a/plugins/modules/fault_set.py +++ b/plugins/modules/fault_set.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing Fault Sets on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/info.py b/plugins/modules/info.py index a114d0c..1bafb60 100644 --- a/plugins/modules/info.py +++ b/plugins/modules/info.py @@ -1,7 +1,7 @@ # !/usr/bin/python # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Ansible module for Gathering information about Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/mdm_cluster.py b/plugins/modules/mdm_cluster.py index 90e0bca..2f2c2c3 100644 --- a/plugins/modules/mdm_cluster.py +++ b/plugins/modules/mdm_cluster.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing MDM Cluster on PowerFlex""" diff --git a/plugins/modules/protection_domain.py b/plugins/modules/protection_domain.py index 18cb952..60edb78 100644 --- a/plugins/modules/protection_domain.py +++ b/plugins/modules/protection_domain.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing Protection Domain on Dell Technologies (Dell) PowerFlex""" from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/replication_consistency_group.py b/plugins/modules/replication_consistency_group.py index b106dfb..be3333e 100644 --- a/plugins/modules/replication_consistency_group.py +++ b/plugins/modules/replication_consistency_group.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing replication consistency groups on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/replication_pair.py b/plugins/modules/replication_pair.py index 1bd69f2..eeef683 100644 --- a/plugins/modules/replication_pair.py +++ b/plugins/modules/replication_pair.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing replication pairs on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/resource_group.py b/plugins/modules/resource_group.py index 768d0c9..a44e9e3 100644 --- a/plugins/modules/resource_group.py +++ b/plugins/modules/resource_group.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing resource group deployments on Dell Technologies (Dell) PowerFlex""" from __future__ import (absolute_import, division, print_function) diff --git a/plugins/modules/sdc.py b/plugins/modules/sdc.py index bb13a19..9ede55e 100644 --- a/plugins/modules/sdc.py +++ b/plugins/modules/sdc.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2021, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing SDCs on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/sds.py b/plugins/modules/sds.py index b0d3045..cd7cd0c 100644 --- a/plugins/modules/sds.py +++ b/plugins/modules/sds.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing SDS on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/snapshot.py b/plugins/modules/snapshot.py index 0cc41c5..34122f0 100644 --- a/plugins/modules/snapshot.py +++ b/plugins/modules/snapshot.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2021, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing Snapshots on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/snapshot_policy.py b/plugins/modules/snapshot_policy.py index af2084e..82603e8 100644 --- a/plugins/modules/snapshot_policy.py +++ b/plugins/modules/snapshot_policy.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing snapshot policies on Dell Technologies (Dell) PowerFlex""" diff --git a/plugins/modules/storagepool.py b/plugins/modules/storagepool.py index 5aca87b..dff999f 100644 --- a/plugins/modules/storagepool.py +++ b/plugins/modules/storagepool.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2021-24, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Ansible module for managing Dell Technologies (Dell) PowerFlex storage pool""" diff --git a/plugins/modules/volume.py b/plugins/modules/volume.py index 0fc3018..101413f 100644 --- a/plugins/modules/volume.py +++ b/plugins/modules/volume.py @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright: (c) 2021, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Ansible module for managing volumes on Dell Technologies (Dell) PowerFlex""" diff --git a/roles/powerflex_common/meta/main.yml b/roles/powerflex_common/meta/main.yml index bbe74f9..3acfb11 100644 --- a/roles/powerflex_common/meta/main.yml +++ b/roles/powerflex_common/meta/main.yml @@ -14,7 +14,6 @@ galaxy_info: # - MIT # - GPL-2.0-or-later # - GPL-3.0-only - # - Apache-2.0 # - CC-BY-4.0 license: GPL-3.0-only diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt deleted file mode 100644 index 438f0a7..0000000 --- a/tests/sanity/ignore-2.15.txt +++ /dev/null @@ -1,47 +0,0 @@ -plugins/modules/sds.py import-2.7 -plugins/modules/sds.py import-3.5 -plugins/modules/sds.py compile-2.7 -plugins/modules/sds.py compile-3.5 -plugins/modules/info.py import-2.7 -plugins/modules/info.py import-3.5 -plugins/modules/info.py compile-2.7 -plugins/modules/fault_set.py import-2.7 -plugins/modules/fault_set.py import-3.5 -plugins/modules/fault_set.py compile-2.7 -plugins/modules/fault_set.py compile-3.5 -plugins/module_utils/storage/dell/libraries/configuration.py import-2.7 -plugins/module_utils/storage/dell/libraries/configuration.py import-3.5 -plugins/module_utils/storage/dell/libraries/configuration.py compile-2.7 -plugins/module_utils/storage/dell/libraries/configuration.py compile-3.5 -plugins/modules/device.py validate-modules:missing-gplv3-license -plugins/modules/sdc.py validate-modules:missing-gplv3-license -plugins/modules/sds.py validate-modules:missing-gplv3-license -plugins/modules/snapshot.py validate-modules:missing-gplv3-license -plugins/modules/storagepool.py validate-modules:missing-gplv3-license -plugins/modules/volume.py validate-modules:missing-gplv3-license -plugins/modules/info.py validate-modules:missing-gplv3-license -plugins/modules/protection_domain.py validate-modules:missing-gplv3-license -plugins/modules/mdm_cluster.py validate-modules:missing-gplv3-license -plugins/modules/replication_consistency_group.py validate-modules:missing-gplv3-license -plugins/modules/replication_pair.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py validate-modules:missing-gplv3-license -plugins/modules/fault_set.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py compile-2.7 -plugins/modules/snapshot_policy.py compile-3.5 -plugins/modules/snapshot_policy.py import-2.7 -plugins/modules/snapshot_policy.py import-3.5 -plugins/modules/sdc.py import-2.7 -plugins/modules/sdc.py import-3.5 -plugins/modules/sdc.py compile-2.7 -plugins/modules/sdc.py compile-3.5 -tests/unit/plugins/module_utils/mock_device_api.py compile-2.7 -tests/unit/plugins/module_utils/mock_device_api.py compile-3.5 -plugins/modules/replication_consistency_group.py import-2.7 -plugins/modules/replication_consistency_group.py import-3.5 -plugins/modules/replication_consistency_group.py compile-2.7 -plugins/modules/replication_consistency_group.py compile-3.5 -plugins/modules/resource_group.py validate-modules:missing-gplv3-license -plugins/modules/resource_group.py compile-2.7 -plugins/modules/resource_group.py import-2.7 -plugins/modules/storagepool.py compile-2.7 -plugins/modules/storagepool.py import-2.7 diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt deleted file mode 100644 index 5f24f9f..0000000 --- a/tests/sanity/ignore-2.16.txt +++ /dev/null @@ -1,33 +0,0 @@ -plugins/modules/sds.py import-2.7 -plugins/modules/sds.py compile-2.7 -plugins/module_utils/storage/dell/libraries/configuration.py import-2.7 -plugins/module_utils/storage/dell/libraries/configuration.py compile-2.7 -plugins/modules/device.py validate-modules:missing-gplv3-license -plugins/modules/sdc.py validate-modules:missing-gplv3-license -plugins/modules/sds.py validate-modules:missing-gplv3-license -plugins/modules/snapshot.py validate-modules:missing-gplv3-license -plugins/modules/storagepool.py validate-modules:missing-gplv3-license -plugins/modules/volume.py validate-modules:missing-gplv3-license -plugins/modules/info.py validate-modules:missing-gplv3-license -plugins/modules/protection_domain.py validate-modules:missing-gplv3-license -plugins/modules/mdm_cluster.py validate-modules:missing-gplv3-license -plugins/modules/replication_consistency_group.py validate-modules:missing-gplv3-license -plugins/modules/replication_pair.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py validate-modules:missing-gplv3-license -plugins/modules/fault_set.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py compile-2.7 -plugins/modules/snapshot_policy.py import-2.7 -plugins/modules/sdc.py import-2.7 -plugins/modules/sdc.py compile-2.7 -plugins/modules/fault_set.py import-2.7 -plugins/modules/fault_set.py compile-2.7 -tests/unit/plugins/module_utils/mock_device_api.py compile-2.7 -plugins/modules/replication_consistency_group.py import-2.7 -plugins/modules/replication_consistency_group.py compile-2.7 -plugins/modules/info.py compile-2.7 -plugins/modules/info.py import-2.7 -plugins/modules/resource_group.py validate-modules:missing-gplv3-license -plugins/modules/resource_group.py compile-2.7 -plugins/modules/resource_group.py import-2.7 -plugins/modules/storagepool.py compile-2.7 -plugins/modules/storagepool.py import-2.7 diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt deleted file mode 100644 index a464e7b..0000000 --- a/tests/sanity/ignore-2.17.txt +++ /dev/null @@ -1,14 +0,0 @@ -plugins/modules/device.py validate-modules:missing-gplv3-license -plugins/modules/sdc.py validate-modules:missing-gplv3-license -plugins/modules/sds.py validate-modules:missing-gplv3-license -plugins/modules/snapshot.py validate-modules:missing-gplv3-license -plugins/modules/storagepool.py validate-modules:missing-gplv3-license -plugins/modules/volume.py validate-modules:missing-gplv3-license -plugins/modules/info.py validate-modules:missing-gplv3-license -plugins/modules/protection_domain.py validate-modules:missing-gplv3-license -plugins/modules/mdm_cluster.py validate-modules:missing-gplv3-license -plugins/modules/replication_consistency_group.py validate-modules:missing-gplv3-license -plugins/modules/replication_pair.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py validate-modules:missing-gplv3-license -plugins/modules/fault_set.py validate-modules:missing-gplv3-license -plugins/modules/resource_group.py validate-modules:missing-gplv3-license diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt deleted file mode 100644 index a464e7b..0000000 --- a/tests/sanity/ignore-2.18.txt +++ /dev/null @@ -1,14 +0,0 @@ -plugins/modules/device.py validate-modules:missing-gplv3-license -plugins/modules/sdc.py validate-modules:missing-gplv3-license -plugins/modules/sds.py validate-modules:missing-gplv3-license -plugins/modules/snapshot.py validate-modules:missing-gplv3-license -plugins/modules/storagepool.py validate-modules:missing-gplv3-license -plugins/modules/volume.py validate-modules:missing-gplv3-license -plugins/modules/info.py validate-modules:missing-gplv3-license -plugins/modules/protection_domain.py validate-modules:missing-gplv3-license -plugins/modules/mdm_cluster.py validate-modules:missing-gplv3-license -plugins/modules/replication_consistency_group.py validate-modules:missing-gplv3-license -plugins/modules/replication_pair.py validate-modules:missing-gplv3-license -plugins/modules/snapshot_policy.py validate-modules:missing-gplv3-license -plugins/modules/fault_set.py validate-modules:missing-gplv3-license -plugins/modules/resource_group.py validate-modules:missing-gplv3-license diff --git a/tests/unit/plugins/module_utils/libraries/fail_json.py b/tests/unit/plugins/module_utils/libraries/fail_json.py index d270326..0f93e5c 100644 --- a/tests/unit/plugins/module_utils/libraries/fail_json.py +++ b/tests/unit/plugins/module_utils/libraries/fail_json.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Mock fail json for PowerFlex Test modules""" diff --git a/tests/unit/plugins/module_utils/libraries/initial_mock.py b/tests/unit/plugins/module_utils/libraries/initial_mock.py index 7409ab4..3b77883 100644 --- a/tests/unit/plugins/module_utils/libraries/initial_mock.py +++ b/tests/unit/plugins/module_utils/libraries/initial_mock.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/module_utils/libraries/powerflex_unit_base.py b/tests/unit/plugins/module_utils/libraries/powerflex_unit_base.py index 0c06b0c..28e12b1 100644 --- a/tests/unit/plugins/module_utils/libraries/powerflex_unit_base.py +++ b/tests/unit/plugins/module_utils/libraries/powerflex_unit_base.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) diff --git a/tests/unit/plugins/module_utils/mock_api_exception.py b/tests/unit/plugins/module_utils/mock_api_exception.py index 5128e54..26b6cf6 100644 --- a/tests/unit/plugins/module_utils/mock_api_exception.py +++ b/tests/unit/plugins/module_utils/mock_api_exception.py @@ -1,6 +1,6 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Mock ApiException for Dell Technologies (Dell) PowerFlex Test modules""" diff --git a/tests/unit/plugins/module_utils/mock_device_api.py b/tests/unit/plugins/module_utils/mock_device_api.py index 2a2cf87..feac4e9 100644 --- a/tests/unit/plugins/module_utils/mock_device_api.py +++ b/tests/unit/plugins/module_utils/mock_device_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of Device module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_fail_json.py b/tests/unit/plugins/module_utils/mock_fail_json.py index 8e20402..f597cca 100644 --- a/tests/unit/plugins/module_utils/mock_fail_json.py +++ b/tests/unit/plugins/module_utils/mock_fail_json.py @@ -1,6 +1,6 @@ # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Mock fail json for PowerFlex Test modules""" diff --git a/tests/unit/plugins/module_utils/mock_fault_set_api.py b/tests/unit/plugins/module_utils/mock_fault_set_api.py index 1072888..cccf897 100644 --- a/tests/unit/plugins/module_utils/mock_fault_set_api.py +++ b/tests/unit/plugins/module_utils/mock_fault_set_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of fault set module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_info_api.py b/tests/unit/plugins/module_utils/mock_info_api.py index 2682cbd..8a4b9ae 100644 --- a/tests/unit/plugins/module_utils/mock_info_api.py +++ b/tests/unit/plugins/module_utils/mock_info_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of info module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_mdm_cluster_api.py b/tests/unit/plugins/module_utils/mock_mdm_cluster_api.py index e2966fa..f00558c 100644 --- a/tests/unit/plugins/module_utils/mock_mdm_cluster_api.py +++ b/tests/unit/plugins/module_utils/mock_mdm_cluster_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of MDM cluster module on PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_protection_domain_api.py b/tests/unit/plugins/module_utils/mock_protection_domain_api.py index bab9a83..6ab02cd 100644 --- a/tests/unit/plugins/module_utils/mock_protection_domain_api.py +++ b/tests/unit/plugins/module_utils/mock_protection_domain_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of protection domain module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_replication_consistency_group_api.py b/tests/unit/plugins/module_utils/mock_replication_consistency_group_api.py index 0867024..da97b21 100644 --- a/tests/unit/plugins/module_utils/mock_replication_consistency_group_api.py +++ b/tests/unit/plugins/module_utils/mock_replication_consistency_group_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of volume module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_replication_pair_api.py b/tests/unit/plugins/module_utils/mock_replication_pair_api.py index 5ac7010..e58dc92 100644 --- a/tests/unit/plugins/module_utils/mock_replication_pair_api.py +++ b/tests/unit/plugins/module_utils/mock_replication_pair_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of replication pair module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_resource_group_api.py b/tests/unit/plugins/module_utils/mock_resource_group_api.py index 2284434..7cd60a3 100644 --- a/tests/unit/plugins/module_utils/mock_resource_group_api.py +++ b/tests/unit/plugins/module_utils/mock_resource_group_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Mock ApiException for Dell Technologies (Dell) PowerFlex Test modules""" diff --git a/tests/unit/plugins/module_utils/mock_sdc_api.py b/tests/unit/plugins/module_utils/mock_sdc_api.py index ba65bc6..0f94ba6 100644 --- a/tests/unit/plugins/module_utils/mock_sdc_api.py +++ b/tests/unit/plugins/module_utils/mock_sdc_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of SDC module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_sdk_response.py b/tests/unit/plugins/module_utils/mock_sdk_response.py index 9e47f4b..e02b973 100644 --- a/tests/unit/plugins/module_utils/mock_sdk_response.py +++ b/tests/unit/plugins/module_utils/mock_sdk_response.py @@ -1,6 +1,6 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Mock SDKResponse for Unit tests for Dell Technologies (Dell) PowerFlex modules""" diff --git a/tests/unit/plugins/module_utils/mock_sds_api.py b/tests/unit/plugins/module_utils/mock_sds_api.py index 60b5f95..65051ef 100644 --- a/tests/unit/plugins/module_utils/mock_sds_api.py +++ b/tests/unit/plugins/module_utils/mock_sds_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of SDS module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_snapshot_policy_api.py b/tests/unit/plugins/module_utils/mock_snapshot_policy_api.py index 35dabb9..49048dc 100644 --- a/tests/unit/plugins/module_utils/mock_snapshot_policy_api.py +++ b/tests/unit/plugins/module_utils/mock_snapshot_policy_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of snapshot policy module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_storagepool_api.py b/tests/unit/plugins/module_utils/mock_storagepool_api.py index 3f0a895..286a2af 100644 --- a/tests/unit/plugins/module_utils/mock_storagepool_api.py +++ b/tests/unit/plugins/module_utils/mock_storagepool_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of storage pool module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/module_utils/mock_volume_api.py b/tests/unit/plugins/module_utils/mock_volume_api.py index 8c26494..26aa530 100644 --- a/tests/unit/plugins/module_utils/mock_volume_api.py +++ b/tests/unit/plugins/module_utils/mock_volume_api.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Mock Api response for Unit tests of volume module on Dell Technologies (Dell) PowerFlex diff --git a/tests/unit/plugins/modules/test_device.py b/tests/unit/plugins/modules/test_device.py index c182043..e959c53 100644 --- a/tests/unit/plugins/modules/test_device.py +++ b/tests/unit/plugins/modules/test_device.py @@ -1,6 +1,6 @@ # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for Device module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_fault_set.py b/tests/unit/plugins/modules/test_fault_set.py index ea2aa11..1004cd9 100644 --- a/tests/unit/plugins/modules/test_fault_set.py +++ b/tests/unit/plugins/modules/test_fault_set.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for fault set module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_info.py b/tests/unit/plugins/modules/test_info.py index 043fcd5..c9f180d 100644 --- a/tests/unit/plugins/modules/test_info.py +++ b/tests/unit/plugins/modules/test_info.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for info module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_mdm_cluster.py b/tests/unit/plugins/modules/test_mdm_cluster.py index 653fcb2..3440328 100644 --- a/tests/unit/plugins/modules/test_mdm_cluster.py +++ b/tests/unit/plugins/modules/test_mdm_cluster.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for MDM cluster module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_nvme_host.py b/tests/unit/plugins/modules/test_nvme_host.py new file mode 100644 index 0000000..3f2f12a --- /dev/null +++ b/tests/unit/plugins/modules/test_nvme_host.py @@ -0,0 +1,197 @@ +# Copyright: (c) 2024, Dell Technologies + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +"""Unit Tests for NVMe host module on PowerFlex""" + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +import pytest +# pylint: disable=unused-import +from ansible_collections.dellemc.powerflex.tests.unit.plugins.module_utils.libraries import initial_mock +from mock.mock import MagicMock +from ansible_collections.dellemc.powerflex.tests.unit.plugins.module_utils.mock_nvme_host_api import MockNvmeHostApi +from ansible_collections.dellemc.powerflex.tests.unit.plugins.module_utils.mock_api_exception \ + import MockApiException +from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell \ + import utils +from ansible_collections.dellemc.powerflex.tests.unit.plugins.module_utils.mock_fail_json \ + import FailJsonException, fail_json + +utils.get_logger = MagicMock() +utils.get_powerflex_gateway_host_connection = MagicMock() +utils.PowerFlexClient = MagicMock() + +from ansible.module_utils import basic +basic.AnsibleModule = MagicMock() +from ansible_collections.dellemc.powerflex.plugins.modules.nvme_host import PowerFlexNvmeHost + + +class TestPowerflexSdc(): + + get_module_args = MockNvmeHostApi.COMMON_ARGS + + @pytest.fixture + def nvme_host_module_mock(self, mocker): + mocker.patch( + MockNvmeHostApi.MODULE_UTILS_PATH + '.PowerFlexClient', + new=MockApiException) + nvme_host_module_mock = PowerFlexNvmeHost() + nvme_host_module_mock.module.check_mode = False + nvme_host_module_mock.module.fail_json = fail_json + return nvme_host_module_mock + + def test_validate_parameter_no_id(self, nvme_host_module_mock): + self.get_module_args.update({ + "state": "present" + }) + nvme_host_module_mock.module.params = self.get_module_args + try: + nvme_host_module_mock.validate_parameters() + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response( + "id_param") in fj_object.message + + def test_validate_parameter_no_param(self, nvme_host_module_mock): + self.get_module_args.update({ + "nqn": "", + "state": "present" + }) + nvme_host_module_mock.module.params = self.get_module_args + try: + nvme_host_module_mock.validate_parameters() + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response( + "param") in fj_object.message + + def test_get_nvme_host_details(self, nvme_host_module_mock): + self.get_module_args.update({ + "nqn": None, + "nvme_host_id": "test_nvem_host", + "state": "present" + }) + nvme_host_module_mock.module.params = self.get_module_args + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=MockNvmeHostApi.get_nvme_host_details() + ) + nvme_host_module_mock.perform_module_operation() + nvme_host_module_mock.powerflex_conn.sdc.get.assert_called() + + def test_get_nvme_host_details_nqn(self, nvme_host_module_mock): + self.get_module_args.update({ + "nqn": "test_nqn", + "state": "present" + }) + nvme_host_module_mock.module.params = self.get_module_args + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=MockNvmeHostApi.get_nvme_host_details() + ) + nvme_host_module_mock.perform_module_operation() + nvme_host_module_mock.powerflex_conn.sdc.get.assert_called() + + def test_process_create_host(self, nvme_host_module_mock): + nvme_host_module_mock.powerflex_conn.host.create = MagicMock( + return_value=MockNvmeHostApi.create_nvme_host() + ) + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=MockNvmeHostApi.get_nvme_host_details() + ) + ret = nvme_host_module_mock.process_host_creation("test_nqn", None, "test_nvem_host", None, None) + nvme_host_module_mock.powerflex_conn.host.create.assert_called() + assert ret is not None + + def test_create_nvme_host_create_exception(self, nvme_host_module_mock): + self.get_module_args.update({ + "nvme_host_id": "test_nvem_host", + "state": "present" + }) + nvme_host_module_mock.module.params = self.get_module_args + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=[] + ) + try: + nvme_host_module_mock.perform_module_operation() + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response( + "fetch_host") in fj_object.message + + def test_create_nvme_host_nqn_exception(self, nvme_host_module_mock): + nvme_host_module_mock.module.params = self.get_module_args + try: + nvme_host_module_mock.create_nvme_host(None, "test_nvem_host", None, None) + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response( + "create_host") in fj_object.message + + def test_modify_nvme_host(self, nvme_host_module_mock): + details = MockNvmeHostApi.get_nvme_host_details() + ret = nvme_host_module_mock.perform_modify(details[0], None, "5", "6") + assert ret is True + + def test_rename_nvme_host(self, nvme_host_module_mock): + details = MockNvmeHostApi.get_nvme_host_details() + ret = nvme_host_module_mock.perform_modify(details[0], "new_name", "5", "6") + assert ret is True + + def test_modify_nvme_host_rename_exception(self, nvme_host_module_mock): + details = MockNvmeHostApi.get_nvme_host_details() + nvme_host_module_mock.powerflex_conn.sdc.rename = MagicMock( + side_effect=MockApiException + ) + try: + nvme_host_module_mock.perform_modify(details[0], "new_name", "5", "6") + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response("rename_host") in fj_object.message + + def test_modify_nvme_host_modify_max_num_paths_exception(self, nvme_host_module_mock): + details = MockNvmeHostApi.get_nvme_host_details() + nvme_host_module_mock.powerflex_conn.host.modify_max_num_paths = MagicMock( + side_effect=MockApiException + ) + try: + nvme_host_module_mock.perform_modify(details[0], None, "5", "6") + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response("modify_host") in fj_object.message + + def test_modify_nvme_host_modify_max_num_sys_ports_exception(self, nvme_host_module_mock): + details = MockNvmeHostApi.get_nvme_host_details() + nvme_host_module_mock.powerflex_conn.host.modify_max_num_sys_ports = MagicMock( + side_effect=MockApiException + ) + try: + nvme_host_module_mock.perform_modify(details[0], None, "3", "6") + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response("modify_host") in fj_object.message + + def test_delete_nvme_host(self, nvme_host_module_mock): + self.get_module_args.update({ + "nvme_host_name": "test_nvem_host", + "nqn": "test_nqn", + "state": "absent" + }) + nvme_host_module_mock.module.params = self.get_module_args + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=MockNvmeHostApi.get_nvme_host_details() + ) + nvme_host_module_mock.perform_module_operation() + nvme_host_module_mock.powerflex_conn.sdc.delete.assert_called() + + def test_delete_nvme_host_exception(self, nvme_host_module_mock): + self.get_module_args.update({ + "nvme_host_name": "test_nvem_host", + "nqn": "test_nqn", + "state": "absent" + }) + nvme_host_module_mock.module.params = self.get_module_args + nvme_host_module_mock.powerflex_conn.sdc.get = MagicMock( + return_value=MockNvmeHostApi.get_nvme_host_details() + ) + nvme_host_module_mock.powerflex_conn.sdc.delete = MagicMock( + side_effect=MockApiException + ) + try: + nvme_host_module_mock.perform_module_operation() + except FailJsonException as fj_object: + assert MockNvmeHostApi.get_exception_response("delete_host") in fj_object.message diff --git a/tests/unit/plugins/modules/test_protection_domain.py b/tests/unit/plugins/modules/test_protection_domain.py index fa1dfe6..1900366 100644 --- a/tests/unit/plugins/modules/test_protection_domain.py +++ b/tests/unit/plugins/modules/test_protection_domain.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for Protection Domain module on Dell Technologies (Dell) PowerFlex""" diff --git a/tests/unit/plugins/modules/test_replication_consistency_group.py b/tests/unit/plugins/modules/test_replication_consistency_group.py index e1074f2..bf66294 100644 --- a/tests/unit/plugins/modules/test_replication_consistency_group.py +++ b/tests/unit/plugins/modules/test_replication_consistency_group.py @@ -1,6 +1,6 @@ # Copyright: (c) 2022, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for replication consistency group module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_replication_pair.py b/tests/unit/plugins/modules/test_replication_pair.py index e3c9cf1..42e0e48 100644 --- a/tests/unit/plugins/modules/test_replication_pair.py +++ b/tests/unit/plugins/modules/test_replication_pair.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for replication pair module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_resource_group.py b/tests/unit/plugins/modules/test_resource_group.py index 1bf57f0..62da983 100644 --- a/tests/unit/plugins/modules/test_resource_group.py +++ b/tests/unit/plugins/modules/test_resource_group.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for Resource Group module on Dell Technologies (Dell) PowerFlex""" diff --git a/tests/unit/plugins/modules/test_sdc.py b/tests/unit/plugins/modules/test_sdc.py index dbf9ac1..db1ba48 100644 --- a/tests/unit/plugins/modules/test_sdc.py +++ b/tests/unit/plugins/modules/test_sdc.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for SDC module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_sds.py b/tests/unit/plugins/modules/test_sds.py index 30e9a58..326ad05 100644 --- a/tests/unit/plugins/modules/test_sds.py +++ b/tests/unit/plugins/modules/test_sds.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for SDS module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_snapshot_policy.py b/tests/unit/plugins/modules/test_snapshot_policy.py index 275b7b0..187ef75 100644 --- a/tests/unit/plugins/modules/test_snapshot_policy.py +++ b/tests/unit/plugins/modules/test_snapshot_policy.py @@ -1,6 +1,6 @@ # Copyright: (c) 2023, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for snapshot policy module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_storagepool.py b/tests/unit/plugins/modules/test_storagepool.py index c60e1fd..8b4f375 100644 --- a/tests/unit/plugins/modules/test_storagepool.py +++ b/tests/unit/plugins/modules/test_storagepool.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for storage pool module on PowerFlex""" diff --git a/tests/unit/plugins/modules/test_volume.py b/tests/unit/plugins/modules/test_volume.py index e36c136..9c6c2da 100644 --- a/tests/unit/plugins/modules/test_volume.py +++ b/tests/unit/plugins/modules/test_volume.py @@ -1,6 +1,6 @@ # Copyright: (c) 2024, Dell Technologies -# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt) +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit Tests for volume module on PowerFlex"""