From df779da1828a472a0f30ce3a218c50f976db089b Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Mon, 11 Dec 2023 14:19:06 +0530 Subject: [PATCH 01/38] Version bump for runtime.yml --- meta/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/runtime.yml b/meta/runtime.yml index 3a98b9fba..004a5f1e5 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.11.6' +requires_ansible: '>=2.14.0' action_groups: ntnx: - ntnx_acps From 974fc9a4da546e8ce9c12ac09bbbbc8d21df4e16 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Dec 2023 23:11:46 +0530 Subject: [PATCH 02/38] Dummy commit --- meta/runtime.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/runtime.yml b/meta/runtime.yml index 004a5f1e5..d48536188 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,8 +1,9 @@ --- -requires_ansible: '>=2.14.0' +requires_ansible: '>=2.11.6' action_groups: ntnx: - ntnx_acps + - ntnx_acps - ntnx_address_groups - ntnx_categories - ntnx_floating_ips From a07f18746a90d493f4fd556715b3029dad62202b Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Dec 2023 23:42:42 +0530 Subject: [PATCH 03/38] Add ansible lint check --- .github/workflows/ansible-lint.yml | 17 +++++++++++++++++ meta/runtime.yml | 3 +-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ansible-lint.yml diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml new file mode 100644 index 000000000..cbe97b3b1 --- /dev/null +++ b/.github/workflows/ansible-lint.yml @@ -0,0 +1,17 @@ +name: ansible-lint +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: Ansible Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run ansible-lint + uses: ansible/ansible-lint@main diff --git a/meta/runtime.yml b/meta/runtime.yml index d48536188..004a5f1e5 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,9 +1,8 @@ --- -requires_ansible: '>=2.11.6' +requires_ansible: '>=2.14.0' action_groups: ntnx: - ntnx_acps - - ntnx_acps - ntnx_address_groups - ntnx_categories - ntnx_floating_ips From abf5b8e3553dc90e1da555ee2c64b8354900786e Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Dec 2023 00:51:34 +0530 Subject: [PATCH 04/38] Requirements bumpup ansible-core version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ba2c29ea2..38131e9a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pip~=21.3.1 ipaddress~=1.0.23 setuptools~=44.1.1 -ansible~=4.6.0 +ansible-core==2.14.0 requests~=2.26.0 black==21.7b0 flake8==4.0.1 From 980ff38df2af90821eba1881d33c765b939cfa6d Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Dec 2023 00:59:19 +0530 Subject: [PATCH 05/38] Workflow should only have 3.9 as 3.8 and 3.7 support is gone from ansible --- .github/workflows/ansible-lint.yml | 4 ++++ .github/workflows/unit_testing.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index cbe97b3b1..38f37963f 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -13,5 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Python 3.x (latest) + uses: actions/setup-python@v2 + with: + python-version: '3.x' - name: Run ansible-lint uses: ansible/ansible-lint@main diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index a4290acda..0d5eccac8 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 2685ed4fac0aaf3388cc779b18b8c005a9f2f316 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Dec 2023 01:11:25 +0530 Subject: [PATCH 06/38] Revert pipeline changes --- .github/workflows/unit_testing.yml | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index 0d5eccac8..f03211acc 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9'] + python-version: ['3.7', '3.8', '3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9'] + python-version: ['3.7', '3.8', '3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/requirements.txt b/requirements.txt index 38131e9a1..ba2c29ea2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pip~=21.3.1 ipaddress~=1.0.23 setuptools~=44.1.1 -ansible-core==2.14.0 +ansible~=4.6.0 requests~=2.26.0 black==21.7b0 flake8==4.0.1 From 8d432e339c370897f5798e01244cebed505ae986 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Dec 2023 01:12:59 +0530 Subject: [PATCH 07/38] Revert sanity version changes --- .github/workflows/unit_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index f03211acc..a4290acda 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 758e85eb6eb1a30857f2e9fc6e53da3b526fa127 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Dec 2023 01:21:46 +0530 Subject: [PATCH 08/38] Change ansible-core to 2.14.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ba2c29ea2..38131e9a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pip~=21.3.1 ipaddress~=1.0.23 setuptools~=44.1.1 -ansible~=4.6.0 +ansible-core==2.14.0 requests~=2.26.0 black==21.7b0 flake8==4.0.1 From e343ca0b2fe1e6a39178b3341d71cdf7d91665f7 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 12:39:21 +0530 Subject: [PATCH 09/38] Use python 3.9 only and use ubuntu 20.4 runner for ansible unit tests --- .github/workflows/unit_testing.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index a4290acda..6a35735a6 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -9,7 +9,7 @@ on: - main jobs: sanity: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: ['3.9'] @@ -38,10 +38,10 @@ jobs: cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} ansible-test sanity --docker default --python ${{ matrix.python-version }} -v unit_testing: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.9'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 10b2866a6583c6a657274d6bb15d9d3f78288d10 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 12:51:43 +0530 Subject: [PATCH 10/38] Doc fixes --- plugins/doc_fragments/ntnx_credentials.py | 2 +- plugins/inventory/ntnx_prism_vm_inventory.py | 2 +- plugins/modules/ntnx_security_rules.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/doc_fragments/ntnx_credentials.py b/plugins/doc_fragments/ntnx_credentials.py index a125c6bc9..19b932f4b 100644 --- a/plugins/doc_fragments/ntnx_credentials.py +++ b/plugins/doc_fragments/ntnx_credentials.py @@ -24,7 +24,7 @@ class ModuleDocFragment(object): - Prism central port - C(nutanix_port). If not set then the value of the C(NUTANIX_PORT), environment variable is used. type: str - default: 9440 + default: "9440" nutanix_username: description: - Prism central username diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 29cc63551..85a1d0ba7 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -43,7 +43,7 @@ - name: NUTANIX_PASSWORD nutanix_port: description: Prism central port - default: 9440 + default: "9440" type: str env: - name: NUTANIX_PORT diff --git a/plugins/modules/ntnx_security_rules.py b/plugins/modules/ntnx_security_rules.py index 16124e568..a95be3ab6 100644 --- a/plugins/modules/ntnx_security_rules.py +++ b/plugins/modules/ntnx_security_rules.py @@ -22,7 +22,7 @@ description: - PC port type: str - default: 9440 + default: "9440" required: false nutanix_username: description: From 878378ce2813c639284e70b53c9cfd34bb090500 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 13:09:53 +0530 Subject: [PATCH 11/38] 1. Bump up coverage. 2. Lint fixes --- plugins/doc_fragments/ntnx_foundation_base_module.py | 2 +- plugins/inventory/ntnx_prism_vm_inventory.py | 5 +++-- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/doc_fragments/ntnx_foundation_base_module.py b/plugins/doc_fragments/ntnx_foundation_base_module.py index 13dcc6bdf..7834f32b8 100644 --- a/plugins/doc_fragments/ntnx_foundation_base_module.py +++ b/plugins/doc_fragments/ntnx_foundation_base_module.py @@ -22,7 +22,7 @@ class ModuleDocFragment(object): description: - PC port type: str - default: 8000 + default: "8000" required: false timeout: description: diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 85a1d0ba7..0eaf22972 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -9,7 +9,6 @@ DOCUMENTATION = r""" name: ntnx_prism_vm_inventory - plugin_type: inventory short_description: Get a list of Nutanix VMs for ansible dynamic inventory. description: - Get a list of Nutanix VMs for ansible dynamic inventory. @@ -17,7 +16,9 @@ author: - "Balu George (@balugeorge)" - "Prem Karat (@premkarat)" - inventory: ntnx_prism_vm_inventory + requirements: + - "json" + - "tempfile" options: plugin: description: Name of the plugin diff --git a/requirements.txt b/requirements.txt index 38131e9a1..a380011ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ requests~=2.26.0 black==21.7b0 flake8==4.0.1 isort==5.9.3 -coverage==4.5.4 +coverage==6.5.0 shyaml==0.6.2 markupsafe==2 From 0221095ec1af2ca8d88076b1e2f9d368caebf1c3 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 14:05:36 +0530 Subject: [PATCH 12/38] Add notes in inventory modules --- plugins/inventory/ntnx_prism_vm_inventory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 0eaf22972..8136dcc30 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -13,6 +13,8 @@ description: - Get a list of Nutanix VMs for ansible dynamic inventory. version_added: "1.0.0" + notes: + - "This module requires view API access to function." author: - "Balu George (@balugeorge)" - "Prem Karat (@premkarat)" From 99a8cf24cdc447cdff1ab7ea0e155098db5c1ede Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 14:44:24 +0530 Subject: [PATCH 13/38] Minor lint fixes --- plugins/inventory/ntnx_prism_vm_inventory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 8136dcc30..1e0e3cd26 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -14,13 +14,13 @@ - Get a list of Nutanix VMs for ansible dynamic inventory. version_added: "1.0.0" notes: - - "This module requires view API access to function." + - This module requires view API access to function. author: - "Balu George (@balugeorge)" - "Prem Karat (@premkarat)" requirements: - - "json" - - "tempfile" + - "json" + - "tempfile" options: plugin: description: Name of the plugin From 30b859f7284ca4c057d44ef48b0868029a58d0e3 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 14:59:55 +0530 Subject: [PATCH 14/38] notes lint fix --- plugins/inventory/ntnx_prism_vm_inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index 1e0e3cd26..a01999399 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -14,7 +14,7 @@ - Get a list of Nutanix VMs for ansible dynamic inventory. version_added: "1.0.0" notes: - - This module requires view API access to function. + - If author: - "Balu George (@balugeorge)" - "Prem Karat (@premkarat)" From 5069865777118d38bfdae2de36b4896c85602190 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 15:08:12 +0530 Subject: [PATCH 15/38] Fix notes lint faulure --- plugins/inventory/ntnx_prism_vm_inventory.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/inventory/ntnx_prism_vm_inventory.py b/plugins/inventory/ntnx_prism_vm_inventory.py index a01999399..dd6d7fe9b 100644 --- a/plugins/inventory/ntnx_prism_vm_inventory.py +++ b/plugins/inventory/ntnx_prism_vm_inventory.py @@ -14,7 +14,7 @@ - Get a list of Nutanix VMs for ansible dynamic inventory. version_added: "1.0.0" notes: - - If + - User needs to have API View access for resources for this inventory module to work. author: - "Balu George (@balugeorge)" - "Prem Karat (@premkarat)" @@ -64,8 +64,6 @@ type: boolean env: - name: VALIDATE_CERTS - notes: "null" - requirements: "null" extends_documentation_fragment: - constructed """ From 55e2b8150a89945220fb256ea2353d4cba2f9675 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 17:11:37 +0530 Subject: [PATCH 16/38] Fix trailing spaces --- .github/labeler.yml | 2 +- .github/workflows/flake8.yml | 2 +- .github/workflows/isort.yml | 2 +- .github/workflows/ok-to-test-command.yml | 8 ++++---- .github/workflows/ok-to-test.yml | 2 +- examples/address_groups_crud.yml | 18 ++++++++--------- examples/dr/protection_policy.yml | 13 ++++++------ examples/dr/recovery_plan_with_execution.yml | 6 +++--- ...rovision_postgres_ha_instance_with_ips.yml | 20 +++++++++---------- 9 files changed, 35 insertions(+), 38 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 93306afe9..fd3770c3f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -10,4 +10,4 @@ - ".github/**" ⚙ build: - - "Makefile" \ No newline at end of file + - "Makefile" diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 1066a98b5..b149c2cad 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -19,4 +19,4 @@ jobs: - name: Run Flake8 run: | pip install -r requirements.txt - flake8 \ No newline at end of file + flake8 diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index 1d26e99e8..c7e72654d 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -16,4 +16,4 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.x' - - uses: isort/isort-action@master \ No newline at end of file + - uses: isort/isort-action@master diff --git a/.github/workflows/ok-to-test-command.yml b/.github/workflows/ok-to-test-command.yml index 2b7898d96..adf897c40 100644 --- a/.github/workflows/ok-to-test-command.yml +++ b/.github/workflows/ok-to-test-command.yml @@ -47,13 +47,13 @@ jobs: args="${{ github.event.client_payload.slash_command.args.all }}" flag="" if [ "$args" = "allow-disabled" ] - then + then flag="--allow-disabled" fi echo '${{ secrets.FOUNDATION_CONFIG }}' > tests/integration/targets/prepare_foundation_env/vars/main.yml echo '${{ secrets.FC_CONFIG }}' > tests/integration/targets/prepare_fc_env/vars/main.yml - echo '${{ secrets.PC_CONFIG }}' > tests/integration/targets/prepare_env/vars/main.yml - echo '${{ secrets.NDB_CONFIG }}' > tests/integration/targets/prepare_ndb_env/vars/main.yml + echo '${{ secrets.PC_CONFIG }}' > tests/integration/targets/prepare_env/vars/main.yml + echo '${{ secrets.NDB_CONFIG }}' > tests/integration/targets/prepare_ndb_env/vars/main.yml ansible-playbook tests/integration/targets/prepare_env/tasks/prepare_env.yml ansible-playbook tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml ansible-playbook tests/integration/targets/prepare_fc_env/tasks/prepare_fc_env.yml @@ -105,7 +105,7 @@ jobs: number: ${{ github.event.client_payload.pull_request.number }} job: ${{ github.job }} # Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run - conclusion: ${{ job.status }} + conclusion: ${{ job.status }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index f9802acba..23c4e472a 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -17,4 +17,4 @@ jobs: token: ${{ secrets.PAT }} commands: ok-to-test permission: write - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/examples/address_groups_crud.yml b/examples/address_groups_crud.yml index 4b8612bb6..35e5febdb 100644 --- a/examples/address_groups_crud.yml +++ b/examples/address_groups_crud.yml @@ -21,31 +21,29 @@ - network_ip: "10.1.2.2" network_prefix: 32 register: ag - + - name: update address group ntnx_address_groups: state: present - address_group_uuid: "{{ag.address_group_uuid}}" + address_group_uuid: "{{ ag.address_group_uuid }}" name: test-ansible-group-1-updated desc: test-ansible-group-1-desc-updated subnets: - network_ip: "10.1.3.0" network_prefix: 24 register: updated_ag - + - name: Read the updated address group ntnx_address_groups_info: - address_group_uuid: "{{updated_ag.address_group_uuid}}" + address_group_uuid: "{{ updated_ag.address_group_uuid }}" register: ag_info - + - name: Print the address group details debug: - msg: "{{ag_info}}" + msg: "{{ ag_info }}" - - name: Delete the address group. + - name: Delete the address group. ntnx_address_groups: state: absent - address_group_uuid: "{{updated_ag.address_group_uuid}}" + address_group_uuid: "{{ updated_ag.address_group_uuid }}" register: op - - \ No newline at end of file diff --git a/examples/dr/protection_policy.yml b/examples/dr/protection_policy.yml index 2a13f786f..1b5a2d816 100644 --- a/examples/dr/protection_policy.yml +++ b/examples/dr/protection_policy.yml @@ -51,7 +51,7 @@ nutanix_password: "" validate_certs: false state: "absent" - rule_uuid: "{{pr.rule_uuid}}" + rule_uuid: "{{ pr.rule_uuid }}" - name: Create protection rule with async schedule ntnx_protection_rules: @@ -98,7 +98,7 @@ remote_retention_policy: num_snapshots: 1 register: result - + - name: Update previously created protection policy ntnx_protection_rules: nutanix_host: "" @@ -144,18 +144,18 @@ remote_retention_policy: num_snapshots: 2 register: pr - + - name: Get protection policy info and its associated vms info ntnx_protection_rules_info: nutanix_host: "" nutanix_username: "" nutanix_password: "" validate_certs: false - rule_uuid: "{{pr.rule_uuid}}" + rule_uuid: "{{ pr.rule_uuid }}" register: result - debug: - msg: "{{result}}" + msg: "{{ result }}" - name: delete the protection rule ntnx_protection_rules: @@ -164,5 +164,4 @@ nutanix_password: "" validate_certs: false state: "absent" - rule_uuid: "{{pr.rule_uuid}}" - \ No newline at end of file + rule_uuid: "{{ pr.rule_uuid }}" diff --git a/examples/dr/recovery_plan_with_execution.yml b/examples/dr/recovery_plan_with_execution.yml index b99c92c29..561536001 100644 --- a/examples/dr/recovery_plan_with_execution.yml +++ b/examples/dr/recovery_plan_with_execution.yml @@ -73,7 +73,7 @@ - debug: - msg: "{{result}}" + msg: "{{ result }}" - name: Update recovery plan by adding more stages and remove custom IP to enable dynamic IP allocation @@ -164,7 +164,7 @@ ignore_errors: True - debug: - msg: "{{result}}" + msg: "{{ result }}" ###################################### delete the recovery plan ################# @@ -177,4 +177,4 @@ job_uuid: "{{migrate_job.job_uuid}}" plan_uuid: "{{recovery_plan.plan_uuid}}" state: "absent" - register: result \ No newline at end of file + register: result diff --git a/examples/ndb/provision_postgres_ha_instance_with_ips.yml b/examples/ndb/provision_postgres_ha_instance_with_ips.yml index 94607a85d..00e95fc68 100644 --- a/examples/ndb/provision_postgres_ha_instance_with_ips.yml +++ b/examples/ndb/provision_postgres_ha_instance_with_ips.yml @@ -23,11 +23,11 @@ db_params_profile: name: "" - + db_server_cluster: new_cluster: name: "" - cluster: + cluster: name: "" ips: - cluster: @@ -42,17 +42,17 @@ name: "" password: "" pub_ssh_key: "" - vms: + vms: - name: "vm-1" node_type: "database" role: "Primary" ip: "" - + - name: "vm-2" node_type: "database" role: "Secondary" ip: "" - + - name: "vm-3" node_type: "database" role: "Secondary" @@ -61,7 +61,7 @@ - name: "vm-ha-proxy1" node_type: "haproxy" ip: "" - + - name: "vm-ha-proxy2" node_type: "haproxy" ip: "" @@ -80,7 +80,7 @@ desc: TM-desc sla: name: "" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -91,7 +91,7 @@ - name: "" tags: ansible-databases: "ha-instance-dbs" - + automated_patching: maintenance_window: name: "" @@ -104,6 +104,6 @@ post_task_cmd: "ls -F" register: result - + - debug: - msg: "{{result}}" + msg: "{{ result }}" From 6df92ef02bd9602c13690e95a4786785d3db9f00 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 17:33:21 +0530 Subject: [PATCH 17/38] More lint fixes --- .github/labeler.yml | 5 +- .github/workflows/ansible-lint.yml | 3 +- .github/workflows/black.yml | 5 +- .github/workflows/flake8.yml | 3 +- .github/workflows/isort.yml | 3 +- .github/workflows/ok-to-test-command.yml | 39 ++--- .github/workflows/ok-to-test.yml | 4 +- .github/workflows/pr-labels.yml | 5 +- .github/workflows/unit_testing.yml | 35 +++-- meta/runtime.yml | 192 +++++++++++------------ 10 files changed, 151 insertions(+), 143 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index fd3770c3f..ee1fc81ce 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,4 @@ +--- 🐍 python: - "**/*.py" - "*.py" @@ -7,7 +8,7 @@ - "*.md" ⚙ ci: - - ".github/**" + - .github/** ⚙ build: - - "Makefile" + - Makefile diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 38f37963f..7d3ecdd6f 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -1,3 +1,4 @@ +--- name: ansible-lint on: push: @@ -16,6 +17,6 @@ jobs: - name: Set up Python 3.x (latest) uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: 3.x - name: Run ansible-lint uses: ansible/ansible-lint@main diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 1144aa148..379b16bec 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,3 +1,4 @@ +--- name: Black on: push: @@ -15,8 +16,8 @@ jobs: - name: Set up Python 3.x (latest) uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: 3.x - name: black uses: psf/black@stable with: - version: "22.6.0" + version: 22.6.0 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index b149c2cad..1f68cbff5 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -1,3 +1,4 @@ +--- name: Flake8 on: push: @@ -15,7 +16,7 @@ jobs: - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: "3.9" - name: Run Flake8 run: | pip install -r requirements.txt diff --git a/.github/workflows/isort.yml b/.github/workflows/isort.yml index c7e72654d..676cb7244 100644 --- a/.github/workflows/isort.yml +++ b/.github/workflows/isort.yml @@ -1,3 +1,4 @@ +--- name: Isort on: push: @@ -15,5 +16,5 @@ jobs: - name: Set up Python 3.x uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: 3.x - uses: isort/isort-action@master diff --git a/.github/workflows/ok-to-test-command.yml b/.github/workflows/ok-to-test-command.yml index adf897c40..ef80ef365 100644 --- a/.github/workflows/ok-to-test-command.yml +++ b/.github/workflows/ok-to-test-command.yml @@ -1,3 +1,4 @@ +--- name: Integration Test cases on: pull_request: @@ -10,14 +11,14 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: ['3.9'] + python-version: ["3.9"] if: github.event_name == 'repository_dispatch' steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - uses: actions/checkout@v2 with: - ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge' + ref: refs/pull/${{ github.event.client_payload.pull_request.number }}/merge - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -65,23 +66,23 @@ jobs: - name: Code Coverage Check if: ${{ always() }} - run: | - cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - ansible-test coverage html - sshpass -p '${{ secrets.FILER_PASSWORD }}' scp -r tests/output ${{ secrets.FILER_LOCATION }} - echo "Code coverage: Checking if code coverage is above threshold..." - export COVERAGE_THRESHOLD=70 - echo "Threshold: $COVERAGE_THRESHOLD %" - totalCoverage=`grep TOTAL coverage.txt | awk '{print $6}' | sed 's/%//'` - echo "TOTAL_COVERAGE=${totalCoverage}" >> $GITHUB_ENV - echo "Current integration test coverage : $totalCoverage %" - if (( $(echo "$totalCoverage $COVERAGE_THRESHOLD" | awk '{print ($1 > $2)}') )); then - echo "Coverage passed" - else - echo "Current integration test coverage is below threshold. Please add more integration tests or adjust threshold to a lower value." - echo "Coverage check failed" - exit 1 - fi + run: | + cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + ansible-test coverage html + sshpass -p '${{ secrets.FILER_PASSWORD }}' scp -r tests/output ${{ secrets.FILER_LOCATION }} + echo "Code coverage: Checking if code coverage is above threshold..." + export COVERAGE_THRESHOLD=70 + echo "Threshold: $COVERAGE_THRESHOLD %" + totalCoverage=`grep TOTAL coverage.txt | awk '{print $6}' | sed 's/%//'` + echo "TOTAL_COVERAGE=${totalCoverage}" >> $GITHUB_ENV + echo "Current integration test coverage : $totalCoverage %" + if (( $(echo "$totalCoverage $COVERAGE_THRESHOLD" | awk '{print ($1 > $2)}') )); then + echo "Coverage passed" + else + echo "Current integration test coverage is below threshold. Please add more integration tests or adjust threshold to a lower value." + echo "Coverage check failed" + exit 1 + fi - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index 23c4e472a..c06a726bf 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -1,7 +1,7 @@ -name: 'Ok-To-Test' +--- +name: Ok-To-Test on: [issue_comment] - jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index af280308b..469003a2c 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -1,7 +1,8 @@ +--- name: PR Labeler on: -- pull_request + - pull_request jobs: label: @@ -9,4 +10,4 @@ jobs: steps: - uses: actions/labeler@v2 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/unit_testing.yml b/.github/workflows/unit_testing.yml index 6a35735a6..563ded596 100644 --- a/.github/workflows/unit_testing.yml +++ b/.github/workflows/unit_testing.yml @@ -1,3 +1,4 @@ +--- name: Run compile and tests on: @@ -12,7 +13,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.9'] + python-version: ["3.9"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -41,7 +42,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.9'] + python-version: ["3.9"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -68,18 +69,18 @@ jobs: ansible-test units --docker default --python ${{ matrix.python-version }} --coverage -v ansible-test coverage report --include */plugins/* --omit */utils.py,_fetch_url* > coverage.txt - name: Code Coverage Check - run: | - cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - echo "Code coverage: Checking if code coverage is above threshold..." - export TESTCOV_THRESHOLD=55 - echo "Threshold: $TESTCOV_THRESHOLD %" - totalCoverage=`grep TOTAL coverage.txt | awk '{print $6}' | sed 's/%//'` - echo "TOTAL_COVERAGE=${totalCoverage}" >> $GITHUB_ENV - echo "Current test coverage : $totalCoverage %" - if (( $(echo "$totalCoverage $TESTCOV_THRESHOLD" | awk '{print ($1 > $2)}') )); then - echo "Coverage passed" - else - echo "Current test coverage is below threshold. Please add more unit tests or adjust threshold to a lower value." - echo "Coverage check failed" - exit 1 - fi + run: | + cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} + echo "Code coverage: Checking if code coverage is above threshold..." + export TESTCOV_THRESHOLD=55 + echo "Threshold: $TESTCOV_THRESHOLD %" + totalCoverage=`grep TOTAL coverage.txt | awk '{print $6}' | sed 's/%//'` + echo "TOTAL_COVERAGE=${totalCoverage}" >> $GITHUB_ENV + echo "Current test coverage : $totalCoverage %" + if (( $(echo "$totalCoverage $TESTCOV_THRESHOLD" | awk '{print ($1 > $2)}') )); then + echo "Coverage passed" + else + echo "Current test coverage is below threshold. Please add more unit tests or adjust threshold to a lower value." + echo "Coverage check failed" + exit 1 + fi diff --git a/meta/runtime.yml b/meta/runtime.yml index 004a5f1e5..a7be23b50 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,99 +1,99 @@ --- -requires_ansible: '>=2.14.0' +requires_ansible: ">=2.14.0" action_groups: ntnx: - - ntnx_acps - - ntnx_address_groups - - ntnx_categories - - ntnx_floating_ips - - ntnx_hosts_info - - ntnx_images - - ntnx_image_placement_policy - - ntnx_pbrs - - ntnx_projects - - ntnx_protection_rules - - ntnx_recovery_plans - - ntnx_recovery_plan_jobs - - ntnx_roles - - ntnx_security_rules - - ntnx_service_groups - - ntnx_static_routes - - ntnx_subnets - - ntnx_users - - ntnx_user_groups - - ntnx_vms_ova - - ntnx_vms_clone - - ntnx_vms - - ntnx_vpcs - - ntnx_acps_info - - ntnx_address_groups_info - - ntnx_categories_info - - ntnx_clusters_info - - ntnx_floating_ips_info - - ntnx_images_info - - ntnx_image_placement_policies_info - - ntnx_pbrs_info - - ntnx_permissions_info - - ntnx_projects_info - - ntnx_protection_rules_info - - ntnx_recovery_plans_info - - ntnx_recovery_plan_jobs_info - - ntnx_roles_info - - ntnx_security_rules_info - - ntnx_service_groups_info - - ntnx_static_routes_info - - ntnx_subnets_info - - ntnx_user_groups_info - - ntnx_users_info - - ntnx_vms_info - - ntnx_vpcs_info - - ntnx_foundation_aos_packages_info - - ntnx_foundation_bmc_ipmi_config - - ntnx_foundation_discover_nodes_info - - ntnx_foundation_hypervisor_images_info - - ntnx_foundation_image_upload - - ntnx_foundation_node_network_info - - ntnx_foundation - - ntnx_foundation_central - - ntnx_foundation_central_imaged_nodes_info - - ntnx_foundation_central_imaged_clusters_info - - ntnx_foundation_central_api_keys - - ntnx_foundation_central_api_keys_info - - ntnx_karbon_clusters - - ntnx_karbon_clusters_info - - ntnx_karbon_registries - - ntnx_karbon_registries_info - - ntnx_ndb_databases_info - - ntnx_ndb_clones_info - - ntnx_ndb_time_machines_info - - ntnx_ndb_profiles_info - - ntnx_ndb_db_servers_info - - ntnx_ndb_slas_info - - ntnx_ndb_databases - - ntnx_ndb_register_database - - ntnx_ndb_db_server_vms - - ntnx_ndb_clusters_info - - ntnx_ndb_clusters - - ntnx_ndb_snapshots_info - - ntnx_ndb_vlans - - ntnx_ndb_vlans_info - - ntnx_ndb_stretched_vlans - - ntnx_ndb_time_machine_clusters - - ntnx_ndb_tags - - ntnx_ndb_tags_info - - ntnx_ndb_database_clones - - ntnx_ndb_database_snapshots - - ntnx_ndb_database_clone_refresh - - ntnx_ndb_authorize_db_server_vms - - ntnx_ndb_profiles - - ntnx_ndb_database_log_catchup - - ntnx_ndb_database_restore - - ntnx_ndb_database_scale - - ntnx_ndb_linked_databases - - ntnx_ndb_replicate_database_snapshots - - ntnx_ndb_register_db_server_vm - - ntnx_ndb_maintenance_tasks - - ntnx_ndb_maintenance_window - - ntnx_ndb_maintenance_windows_info - - ntnx_ndb_slas - - ntnx_karbon_clusters_node_pools + - ntnx_acps + - ntnx_address_groups + - ntnx_categories + - ntnx_floating_ips + - ntnx_hosts_info + - ntnx_images + - ntnx_image_placement_policy + - ntnx_pbrs + - ntnx_projects + - ntnx_protection_rules + - ntnx_recovery_plans + - ntnx_recovery_plan_jobs + - ntnx_roles + - ntnx_security_rules + - ntnx_service_groups + - ntnx_static_routes + - ntnx_subnets + - ntnx_users + - ntnx_user_groups + - ntnx_vms_ova + - ntnx_vms_clone + - ntnx_vms + - ntnx_vpcs + - ntnx_acps_info + - ntnx_address_groups_info + - ntnx_categories_info + - ntnx_clusters_info + - ntnx_floating_ips_info + - ntnx_images_info + - ntnx_image_placement_policies_info + - ntnx_pbrs_info + - ntnx_permissions_info + - ntnx_projects_info + - ntnx_protection_rules_info + - ntnx_recovery_plans_info + - ntnx_recovery_plan_jobs_info + - ntnx_roles_info + - ntnx_security_rules_info + - ntnx_service_groups_info + - ntnx_static_routes_info + - ntnx_subnets_info + - ntnx_user_groups_info + - ntnx_users_info + - ntnx_vms_info + - ntnx_vpcs_info + - ntnx_foundation_aos_packages_info + - ntnx_foundation_bmc_ipmi_config + - ntnx_foundation_discover_nodes_info + - ntnx_foundation_hypervisor_images_info + - ntnx_foundation_image_upload + - ntnx_foundation_node_network_info + - ntnx_foundation + - ntnx_foundation_central + - ntnx_foundation_central_imaged_nodes_info + - ntnx_foundation_central_imaged_clusters_info + - ntnx_foundation_central_api_keys + - ntnx_foundation_central_api_keys_info + - ntnx_karbon_clusters + - ntnx_karbon_clusters_info + - ntnx_karbon_registries + - ntnx_karbon_registries_info + - ntnx_ndb_databases_info + - ntnx_ndb_clones_info + - ntnx_ndb_time_machines_info + - ntnx_ndb_profiles_info + - ntnx_ndb_db_servers_info + - ntnx_ndb_slas_info + - ntnx_ndb_databases + - ntnx_ndb_register_database + - ntnx_ndb_db_server_vms + - ntnx_ndb_clusters_info + - ntnx_ndb_clusters + - ntnx_ndb_snapshots_info + - ntnx_ndb_vlans + - ntnx_ndb_vlans_info + - ntnx_ndb_stretched_vlans + - ntnx_ndb_time_machine_clusters + - ntnx_ndb_tags + - ntnx_ndb_tags_info + - ntnx_ndb_database_clones + - ntnx_ndb_database_snapshots + - ntnx_ndb_database_clone_refresh + - ntnx_ndb_authorize_db_server_vms + - ntnx_ndb_profiles + - ntnx_ndb_database_log_catchup + - ntnx_ndb_database_restore + - ntnx_ndb_database_scale + - ntnx_ndb_linked_databases + - ntnx_ndb_replicate_database_snapshots + - ntnx_ndb_register_db_server_vm + - ntnx_ndb_maintenance_tasks + - ntnx_ndb_maintenance_window + - ntnx_ndb_maintenance_windows_info + - ntnx_ndb_slas + - ntnx_karbon_clusters_node_pools From 2925c1f1d1874ec4d2280f63eaac7a25c5dad05c Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 17:49:03 +0530 Subject: [PATCH 18/38] More lint fixes --- .github/workflows/ok-to-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index c06a726bf..dfe87197b 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -9,7 +9,8 @@ jobs: steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}. And Github Token is ${{ secrets.GITHUB_TOKEN }}" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - run: echo "Your Github Token is ${{ secrets.GITHUB_TOKEN }}" - name: Slash Command Dispatch uses: peter-evans/slash-command-dispatch@v2 From 21e7cddc7fb599526c3a709432e393161181008d Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 4 Jan 2024 18:10:40 +0530 Subject: [PATCH 19/38] Remove ansible lint check --- .github/workflows/ansible-lint.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/ansible-lint.yml diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml deleted file mode 100644 index 7d3ecdd6f..000000000 --- a/.github/workflows/ansible-lint.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: ansible-lint -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - name: Ansible Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.x (latest) - uses: actions/setup-python@v2 - with: - python-version: 3.x - - name: Run ansible-lint - uses: ansible/ansible-lint@main From 100ffc243790bd989b36fe0491f781fd4b7bc9ad Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 17:26:06 +0530 Subject: [PATCH 20/38] Fix fetch_url for ansible versions >= 2.13.0 --- plugins/module_utils/entity.py | 5 +++- .../nutanix_vms/tasks/negtaive_scenarios.yml | 28 +++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/plugins/module_utils/entity.py b/plugins/module_utils/entity.py index 735d9d3d5..953b7828d 100644 --- a/plugins/module_utils/entity.py +++ b/plugins/module_utils/entity.py @@ -364,7 +364,10 @@ def _fetch_url( # buffer size with ref. to max read size of http.client.HTTPResponse.read() defination buffer_size = 65536 - if not resp: + + # From ansible-core>=2.13, incase of http error, urllib.HTTPError object is returned in resp + # as per the docs of ansible we need to use body in that case. + if not resp or status_code >= 400: # get body containing error body = info.get("body") else: diff --git a/tests/integration/targets/nutanix_vms/tasks/negtaive_scenarios.yml b/tests/integration/targets/nutanix_vms/tasks/negtaive_scenarios.yml index 62541322a..f003d4459 100644 --- a/tests/integration/targets/nutanix_vms/tasks/negtaive_scenarios.yml +++ b/tests/integration/targets/nutanix_vms/tasks/negtaive_scenarios.yml @@ -18,7 +18,7 @@ bus: "SCSI" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -49,7 +49,7 @@ memory_gb: 1 register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -81,10 +81,10 @@ - result.failed == True - result.response.state == 'ERROR' - result.status_code == 422 - - result.error == "HTTP Error 422: UNPROCESSABLE ENTITY"" + - result.error == "HTTP Error 422: UNPROCESSABLE ENTITY" success_msg: ' Success: returned error as expected ' fail_msg: ' Fail Vm created successfully with unknown cluster ' -################################################################################ +################################################################################ - name: Unknown Cluster name ntnx_vms: state: present @@ -127,7 +127,7 @@ name: "vlan.8000" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -137,7 +137,7 @@ - result.error == "Subnet vlan.8000 not found." success_msg: ' Success: returned error as expected ' fail_msg: ' Fail VM created successfully with unknown network name ' -################################################################################### +################################################################################### - name: Unknown Network uuid ntnx_vms: state: present @@ -154,7 +154,7 @@ uuid: "8000" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -164,8 +164,8 @@ - result.response.state == 'ERROR' - result.status_code == 422 success_msg: ' Success: returned error as expected ' - fail_msg: ' Fail VM created successfully with unknown network name ' -################################################################################### + fail_msg: ' Fail VM created successfully with unknown network name ' +################################################################################### - name: Unknow Image name ntnx_vms: state: present @@ -216,7 +216,7 @@ - result.failed == True success_msg: ' Success: returned error as expected ' fail_msg: ' Fail VM created successfully with invalid argument for size_gb ' -############################################################################################# +############################################################################################# - name: Image size less than actual ntnx_vms: state: present @@ -271,7 +271,7 @@ bus: "SCSI" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -279,14 +279,14 @@ - result.failed == True success_msg: ' Success: returned error as expected ' fail_msg: ' Fail VM created successfully with unknown storage container name ' -################################################################################# +################################################################################# - name: Delete vm with unknown uuid ntnx_vms: state: absent vm_uuid: 5 register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -300,7 +300,7 @@ state: absent register: result ignore_errors: True - + - name: Creation Status assert: that: From a44e50afbd5f8d499cc8afc691fefcd6112b36a6 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 17:28:24 +0530 Subject: [PATCH 21/38] Install community package before inetegration tests --- .github/workflows/ok-to-test-command.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ok-to-test-command.yml b/.github/workflows/ok-to-test-command.yml index ef80ef365..03fad1a88 100644 --- a/.github/workflows/ok-to-test-command.yml +++ b/.github/workflows/ok-to-test-command.yml @@ -26,6 +26,7 @@ jobs: - name: Install dependencies run: | pip install -r tests/integration/requirements.txt + ansible-galaxy collection install community.general - name: Build and install the collection run: | NAMESPACE=$(cat galaxy.yml | shyaml get-value namespace) From b0ce9ec99bd3f3969f921576022994231024a3d6 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 17:32:11 +0530 Subject: [PATCH 22/38] Fix integration requirements.txt --- tests/integration/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index d0289e391..a380011ff 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -1,11 +1,11 @@ pip~=21.3.1 ipaddress~=1.0.23 setuptools~=44.1.1 -ansible~=5.0.1 +ansible-core==2.14.0 requests~=2.26.0 black==21.7b0 flake8==4.0.1 isort==5.9.3 -coverage==4.5.4 +coverage==6.5.0 shyaml==0.6.2 markupsafe==2 From 88752afef45b7d07dcad4109f97e96abcaf3d2f2 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 18:17:43 +0530 Subject: [PATCH 23/38] print ansible version in pipeliines --- .github/workflows/ok-to-test-command.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ok-to-test-command.yml b/.github/workflows/ok-to-test-command.yml index 03fad1a88..6e51cd386 100644 --- a/.github/workflows/ok-to-test-command.yml +++ b/.github/workflows/ok-to-test-command.yml @@ -26,6 +26,9 @@ jobs: - name: Install dependencies run: | pip install -r tests/integration/requirements.txt + - name: Print ansible & python version and install dependent roles + run: | + ansible --version ansible-galaxy collection install community.general - name: Build and install the collection run: | From eed642a514a627df6efd92afa684fe89f7d5a45b Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 19:21:00 +0530 Subject: [PATCH 24/38] Update source branch of ok to test --- .github/workflows/ok-to-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index dfe87197b..a2bc0b1de 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -12,6 +12,10 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - run: echo "Your Github Token is ${{ secrets.GITHUB_TOKEN }}" + - uses: actions/checkout@v2 + with: + ref: feat/red-hat-compatibility-issues + - name: Slash Command Dispatch uses: peter-evans/slash-command-dispatch@v2 with: From bac6d9059cd4fceaa3de44fee2ae36da04deb043 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 19:27:03 +0530 Subject: [PATCH 25/38] revert workflows temp changes --- .github/workflows/ok-to-test-command.yml | 4 ---- .github/workflows/ok-to-test.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/ok-to-test-command.yml b/.github/workflows/ok-to-test-command.yml index 6e51cd386..ef80ef365 100644 --- a/.github/workflows/ok-to-test-command.yml +++ b/.github/workflows/ok-to-test-command.yml @@ -26,10 +26,6 @@ jobs: - name: Install dependencies run: | pip install -r tests/integration/requirements.txt - - name: Print ansible & python version and install dependent roles - run: | - ansible --version - ansible-galaxy collection install community.general - name: Build and install the collection run: | NAMESPACE=$(cat galaxy.yml | shyaml get-value namespace) diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index a2bc0b1de..dfe87197b 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -12,10 +12,6 @@ jobs: - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - run: echo "Your Github Token is ${{ secrets.GITHUB_TOKEN }}" - - uses: actions/checkout@v2 - with: - ref: feat/red-hat-compatibility-issues - - name: Slash Command Dispatch uses: peter-evans/slash-command-dispatch@v2 with: From 05eae7119cdbba01fa5711001872fdbb46a226f1 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Wed, 13 Mar 2024 19:30:30 +0530 Subject: [PATCH 26/38] Not run foundation and ndb sanity test --- tests/integration/targets/ntnx_foundation_sanity/aliases | 1 + tests/integration/targets/ntnx_ndb_databases_sanity/aliases | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integration/targets/ntnx_foundation_sanity/aliases b/tests/integration/targets/ntnx_foundation_sanity/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/aliases +++ b/tests/integration/targets/ntnx_foundation_sanity/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases @@ -0,0 +1 @@ +disabled From d90b687be34cdad902de3190b6881e3bdd2ca2da Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Mar 2024 12:12:00 +0530 Subject: [PATCH 27/38] Fix PBRS tests. Add correct value types for code and type in icmp spec --- .../nutanix_pbrs/tasks/negative_scenarios.yml | 57 ++++++++----------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/tests/integration/targets/nutanix_pbrs/tasks/negative_scenarios.yml b/tests/integration/targets/nutanix_pbrs/tasks/negative_scenarios.yml index c0decd762..67c4312c3 100644 --- a/tests/integration/targets/nutanix_pbrs/tasks/negative_scenarios.yml +++ b/tests/integration/targets/nutanix_pbrs/tasks/negative_scenarios.yml @@ -17,17 +17,17 @@ reroute: "{{reroute_ip}}" protocol: icmp: - type: "*" - code: "*" - register: result + code: "{{ icmp.code }}" + type: "{{ icmp.type }}" + register: result ignore_errors: True - + - name: Creation Status assert: that: - result.failed is defined success_msg: ' Success: returned error as expected ' -################################################################## +################################################################## - name: Create PBR with priority less than 10 ntnx_pbrs: state: present @@ -44,11 +44,11 @@ reroute: "{{reroute_ip}}" protocol: icmp: - type: "*" - code: "*" - register: result + code: "{{ icmp.code }}" + type: "{{ icmp.type }}" + register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -73,11 +73,15 @@ icmp: code: "{{ icmp.code }}" type: "{{ icmp.type }}" - register: result + register: result ignore_errors: True -- set_fact: - todelete: "{{ todelete + [ result.pbr_uuid ] }}" +- name: Check failure status + assert: + that: + - result.failed == true + success_msg: ' Success: returned error as expected ' + ################################################################# - name: Create PBR with unknown vpc uuid ntnx_pbrs: @@ -95,11 +99,11 @@ reroute: "{{reroute_ip}}" protocol: icmp: - type: "*" - code: "*" - register: result + code: "{{ icmp.code }}" + type: "{{ icmp.type }}" + register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -122,11 +126,11 @@ reroute: "{{reroute_ip}}" protocol: icmp: - type: "*" - code: "10" - register: result + type: 10 + code: 10 + register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -138,19 +142,6 @@ state: absent pbr_uuid: 5 register: result - loop: "{{ todelete }}" - ignore_errors: True -- name: Creation Status - assert: - that: - - result.failed is defined - success_msg: ' Success: returned error as expected ' -####################################################################### -- name: Delete pbrs with unknown uuid - ntnx_pbrs: - state: absent - register: result - loop: "{{ todelete }}" ignore_errors: True - name: Creation Status assert: From 3808d849ed9eb26a49a4143cbcdcc74519adde39 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Thu, 14 Mar 2024 23:11:38 +0530 Subject: [PATCH 28/38] Enable NDB sanity tests --- .../targets/ntnx_ndb_database_clones/aliases | 1 + .../targets/ntnx_ndb_databases_sanity/aliases | 1 - .../ntnx_ndb_databases_sanity/tasks/tests.yml | 78 +++++++++---------- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tests/integration/targets/ntnx_ndb_database_clones/aliases b/tests/integration/targets/ntnx_ndb_database_clones/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_ndb_database_clones/aliases +++ b/tests/integration/targets/ntnx_ndb_database_clones/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/tasks/tests.yml b/tests/integration/targets/ntnx_ndb_databases_sanity/tasks/tests.yml index fcfbbe519..26cc67f06 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/tasks/tests.yml +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/tasks/tests.yml @@ -27,13 +27,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}" desc: vm for db server password: "test_password" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -42,7 +42,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "test_key" - + postgres: listener_port: "9999" db_name: testAnsible @@ -59,7 +59,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -68,8 +68,8 @@ snapshots_per_day: 2 auto_tune_staging_drive: False tags: - ansible-databases: "single-instance-dbs" - + databases: "single-instance-dbs" + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -189,7 +189,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -220,14 +220,14 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: ip: "{{ vm_ip }}" name: "{{ vm1_name }}" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -236,7 +236,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "{{ public_ssh_key }}" - + postgres: listener_port: "5432" db_name: testAnsible @@ -249,7 +249,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -257,8 +257,8 @@ log_catchup: 30 snapshots_per_day: 2 tags: - ansible-databases: "single-instance-dbs" - + databases: "single-instance-dbs" + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -280,16 +280,16 @@ when: properties is undefined # skip jekyll/Liquid syntax check -# +# - name: create properties map - set_fact: + set_fact: properties: "{{ properties | combine ({ item['name'] : item['value'] }) }}" - loop: "{{result.response.properties}}" + loop: "{{result.response.properties}}" no_log: true # - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -319,7 +319,7 @@ register: result - name: Verify DB server VM status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -337,16 +337,16 @@ check_mode: yes ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: - ansible-databases: "single-instance-dbs-updated" + databases: "single-instance-dbs-updated" register: result -- name: check mode status - assert: +- name: check mode status + assert: that: - result.response is defined - result.changed == False @@ -359,16 +359,16 @@ - name: update database ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: - ansible-databases: "single-instance-dbs-updated" + databases: "single-instance-dbs-updated" register: result - name: update status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -388,16 +388,16 @@ - name: idempotency checks ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: - ansible-databases: "single-instance-dbs-updated" + databases: "single-instance-dbs-updated" register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -411,13 +411,13 @@ check_mode: yes ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true delete_db_from_vm: true register: result - name: verify delete check mode spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -433,14 +433,14 @@ check_mode: yes ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true soft_delete: true delete_time_machine: true register: result - name: verify soft remove check mode spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -451,7 +451,7 @@ fail_msg: "creation of spec for soft remove with time machine delete failed" success_msg: "spec for soft remove with time machine delete created successfully" - + #####################################INFO Module tests####################################################### - debug: @@ -549,14 +549,14 @@ - name: unregister db along with delete time machine ntnx_ndb_databases: - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" state: "absent" wait: true delete_time_machine: true register: result - name: verify status of delete of database along with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -576,7 +576,7 @@ register: result - name: check delete status - assert: + assert: that: - result.response is defined - result.changed == True From 797ed6fd2ad7ff5d467e13c7863c6a05fa11e6fd Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 11:24:56 +0530 Subject: [PATCH 29/38] Fix read me typos --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 999354992..8b815f98f 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ This collection requires Python 2.7 or greater > For the 1.2.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.5. -> For the 1.3.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.4. +> For the 1.3.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.4. -> For the 1.4.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.4. +> For the 1.4.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.4, pc2022.1.0.2 and pc.2021.9.0.4. > For the 1.5.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.6, pc.2022.4.0.2 and pc2022.1.0.2. @@ -57,7 +57,7 @@ Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/ma ## Foundation > For the 1.1.0 release of the ansible plugin, it will have N-1 compatibility with the Foundation. This release was tested against Foundation versions v5.2 and v5.1.1 -> For the 1.9.1 release of the ansible plugin, it was tested against NDB versions v2.5.2 +> For the 1.9.1 release of the ansible plugin, it was tested against versions v5.2 Foundation based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/foundation @@ -67,11 +67,11 @@ Foundation based examples : https://github.com/nutanix/nutanix.ansible/tree/main Foundation Central based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/fc ## Karbon -> For the 1.6.0 release of the ansible plugin, it will have N-2 compatibility with the Karbon. This release was tested against Karbon versions v2.3.0, v2.4.0 and v2.5.0 +> For the 1.6.0 release of the ansible plugin, it will have N-2 compatibility with the Karbon. This release was tested against Karbon versions v2.3.0, v2.4.0 and v2.5.0 -> For the 1.9.0 release of the ansible plugin, it was tested against Karbon versions v2.6.0, v2.7.0 and v2.8.0 +> For the 1.9.0 release of the ansible plugin, it was tested against Karbon versions v2.6.0, v2.7.0 and v2.8.0 -> For the 1.9.1 release of the ansible plugin, it was tested against Karbon version v2.8.0 +> For the 1.9.1 release of the ansible plugin, it was tested against Karbon version v2.8.0 Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/karbon @@ -87,7 +87,7 @@ NDB based examples : https://github.com/nutanix/nutanix.ansible/tree/main/exampl ### Notes: 1. Currently NDB based modules are supported and tested against postgres based databases. - + # Installing the collection **Prerequisite** @@ -275,13 +275,13 @@ We glady welcome contributions from the community. From updating the documentati To conduct integration tests for a specific Ansible module such as the `ntnx_vms` module, the following step-by-step procedures can be followed: ### Prerequisites -- Ensure you are in the installed collection directory where the module is located. For example: +- Ensure you are in the installed collection directory where the module is located. For example: `/Users/mac.user1/.ansible/collections/ansible_collections/nutanix/ncp` ### Setting up Variables 1. Navigate to the `tests/integration/targets` directory within the collection. -2. Define the necessary variables within the feature-specific var files, such as `tests/integration/targets/prepare_env/vars/main.yml`, `tests/integration/targets/prepare_foundation_env/vars/main.yml`,`tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml`, etc. +2. Define the necessary variables within the feature-specific var files, such as `tests/integration/targets/prepare_env/vars/main.yml`, `tests/integration/targets/prepare_foundation_env/vars/main.yml`,`tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml`, etc. Note: For Karbon and FC tests, use the PC vars exclusively, as these features rely on pc setup. Not all variables are mandatory; define only the required variables for the particular feature to be tested. From 971edac8e90ea43814fade9ed83f36c5bc4d64eb Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 14:18:09 +0530 Subject: [PATCH 30/38] Enable foundation sanity and some lint fixes --- .../targets/ntnx_foundation_sanity/aliases | 1 - .../tasks/image_nodes.yml | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/integration/targets/ntnx_foundation_sanity/aliases b/tests/integration/targets/ntnx_foundation_sanity/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/aliases +++ b/tests/integration/targets/ntnx_foundation_sanity/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml index be63b56f2..106cded94 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml +++ b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml @@ -34,17 +34,17 @@ node_position: "{{nodes.node1.node_position}}" clusters: - redundancy_factor: 1 - cluster_members: + cluster_members: - "{{nodes.node1.cvm_ip}}" name: "test-cluster" timezone: "Asia/Calcutta" - cvm_ntp_servers: + cvm_ntp_servers: - "{{nodes.ntp_servers[0]}}" - "{{nodes.ntp_servers[1]}}" cvm_dns_servers: - "{{nodes.dns_servers[0]}}" - "{{nodes.dns_servers[1]}}" - hypervisor_ntp_servers: + hypervisor_ntp_servers: - "{{nodes.ntp_servers[0]}}" - "{{nodes.ntp_servers[1]}}" enable_ns: true @@ -102,11 +102,11 @@ "hypervisor_gateway": "{{hypervisor_gateway}}", "hypervisor_iso": {}, "hypervisor_netmask": "{{hypervisor_netmask}}", - "ipmi_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", + "ipmi_user": "{{default_ipmi_user}}", "nos_package": "{{images.aos_packages[0]}}" } - - name: Verify spec + - name: Verify spec assert: that: - spec.response is defined @@ -179,17 +179,17 @@ node_position: "{{nodes.node1.node_position}}" clusters: - redundancy_factor: 1 - cluster_members: + cluster_members: - "{{nodes.node1.cvm_ip}}" name: "test-cluster" timezone: "Asia/Calcutta" - cvm_ntp_servers: + cvm_ntp_servers: - "{{nodes.ntp_servers[0]}}" - "{{nodes.ntp_servers[1]}}" cvm_dns_servers: - "{{nodes.dns_servers[0]}}" - "{{nodes.dns_servers[1]}}" - hypervisor_ntp_servers: + hypervisor_ntp_servers: - "{{nodes.ntp_servers[0]}}" - "{{nodes.ntp_servers[1]}}" register: result @@ -206,4 +206,4 @@ fail_msg: " Fail : unable to image nodes and create cluster" success_msg: "Succes: cluster and node imaging done successfully" -###################################################### \ No newline at end of file +###################################################### From 4dd319f983841d26ea74c199cff5544a4e29dbf2 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 15:35:10 +0530 Subject: [PATCH 31/38] Add bond modes in test for foundation --- .../targets/ntnx_foundation_sanity/tasks/image_nodes.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml index 106cded94..46056d0da 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml +++ b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml @@ -140,6 +140,9 @@ hypervisor: "{{nodes.node1.hypervisor}}" hypervisor_ip: "{{nodes.node1.hypervisor_ip}}" node_position: "{{nodes.node1.node_position}}" + bond_lacp_rate: "{{nodes.node1.bond_lacp_rate}}" + bond_mode: "{{nodes.node1.bond_mode}}" + register: result no_log: true ignore_errors: True @@ -177,6 +180,8 @@ hypervisor: "{{nodes.node1.hypervisor}}" hypervisor_ip: "{{nodes.node1.hypervisor_ip}}" node_position: "{{nodes.node1.node_position}}" + bond_lacp_rate: "{{nodes.node1.bond_lacp_rate}}" + bond_mode: "{{nodes.node1.bond_mode}}" clusters: - redundancy_factor: 1 cluster_members: From be1a11d137d56e0d827af073c9a4e1c4379c7e7b Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 19:23:26 +0530 Subject: [PATCH 32/38] Disable pc tests --- tests/integration/targets/ntnx_acps/aliases | 1 + tests/integration/targets/ntnx_acps_info/aliases | 1 + tests/integration/targets/ntnx_address_groups/aliases | 1 + tests/integration/targets/ntnx_address_groups_info/aliases | 1 + tests/integration/targets/ntnx_categories/aliases | 1 + tests/integration/targets/ntnx_categories_info/aliases | 1 + tests/integration/targets/ntnx_clusters_info/aliases | 1 + .../targets/ntnx_foundation_sanity/tasks/image_nodes.yml | 2 +- tests/integration/targets/ntnx_hosts_info/aliases | 1 + .../targets/ntnx_image_placement_policies_info/aliases | 1 + tests/integration/targets/ntnx_image_placement_policy/aliases | 1 + tests/integration/targets/ntnx_images/aliases | 1 + tests/integration/targets/ntnx_images_info/aliases | 1 + tests/integration/targets/ntnx_karbon_clusters_and_info/aliases | 1 + tests/integration/targets/ntnx_ndb_databases_sanity/aliases | 1 + tests/integration/targets/ntnx_ova/aliases | 1 + tests/integration/targets/ntnx_permissions_info/aliases | 1 + tests/integration/targets/ntnx_projects/aliases | 1 + tests/integration/targets/ntnx_projects_info/aliases | 1 + tests/integration/targets/ntnx_roles/aliases | 1 + tests/integration/targets/ntnx_roles_info/aliases | 1 + tests/integration/targets/ntnx_security_rules/aliases | 1 + tests/integration/targets/ntnx_security_rules_info/aliases | 1 + tests/integration/targets/ntnx_service_groups/aliases | 1 + tests/integration/targets/ntnx_service_groups_info/aliases | 1 + tests/integration/targets/ntnx_static_routes/aliases | 1 + tests/integration/targets/ntnx_static_routes_info/aliases | 1 + tests/integration/targets/ntnx_user_groups/aliases | 1 + tests/integration/targets/ntnx_users/aliases | 1 + tests/integration/targets/ntnx_users_info/aliases | 1 + tests/integration/targets/ntnx_vms_clone/aliases | 1 + tests/integration/targets/nutanix_floating_ips/aliases | 1 + tests/integration/targets/nutanix_floating_ips_info/aliases | 1 + tests/integration/targets/nutanix_pbrs/aliases | 1 + tests/integration/targets/nutanix_pbrs_info/aliases | 1 + tests/integration/targets/nutanix_subnets/aliases | 1 + tests/integration/targets/nutanix_subnets_info/aliases | 1 + tests/integration/targets/nutanix_vms/aliases | 1 + tests/integration/targets/nutanix_vms_info/aliases | 1 + tests/integration/targets/nutanix_vpcs/aliases | 1 + tests/integration/targets/nutanix_vpcs_info/aliases | 1 + 41 files changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/ntnx_acps/aliases b/tests/integration/targets/ntnx_acps/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_acps/aliases +++ b/tests/integration/targets/ntnx_acps/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_acps_info/aliases b/tests/integration/targets/ntnx_acps_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_acps_info/aliases +++ b/tests/integration/targets/ntnx_acps_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_address_groups/aliases b/tests/integration/targets/ntnx_address_groups/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_address_groups/aliases +++ b/tests/integration/targets/ntnx_address_groups/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_address_groups_info/aliases b/tests/integration/targets/ntnx_address_groups_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_address_groups_info/aliases +++ b/tests/integration/targets/ntnx_address_groups_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_categories/aliases b/tests/integration/targets/ntnx_categories/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_categories/aliases +++ b/tests/integration/targets/ntnx_categories/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_categories_info/aliases b/tests/integration/targets/ntnx_categories_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_categories_info/aliases +++ b/tests/integration/targets/ntnx_categories_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_clusters_info/aliases b/tests/integration/targets/ntnx_clusters_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_clusters_info/aliases +++ b/tests/integration/targets/ntnx_clusters_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml index 46056d0da..9968d60e2 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml +++ b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml @@ -102,7 +102,7 @@ "hypervisor_gateway": "{{hypervisor_gateway}}", "hypervisor_iso": {}, "hypervisor_netmask": "{{hypervisor_netmask}}", - "ipmi_user": "{{default_ipmi_user}}", + "ipmi_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "nos_package": "{{images.aos_packages[0]}}" } diff --git a/tests/integration/targets/ntnx_hosts_info/aliases b/tests/integration/targets/ntnx_hosts_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_hosts_info/aliases +++ b/tests/integration/targets/ntnx_hosts_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_image_placement_policies_info/aliases b/tests/integration/targets/ntnx_image_placement_policies_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_image_placement_policies_info/aliases +++ b/tests/integration/targets/ntnx_image_placement_policies_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_image_placement_policy/aliases b/tests/integration/targets/ntnx_image_placement_policy/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/aliases +++ b/tests/integration/targets/ntnx_image_placement_policy/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_images/aliases b/tests/integration/targets/ntnx_images/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_images/aliases +++ b/tests/integration/targets/ntnx_images/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_images_info/aliases b/tests/integration/targets/ntnx_images_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_images_info/aliases +++ b/tests/integration/targets/ntnx_images_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases b/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases +++ b/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_ova/aliases b/tests/integration/targets/ntnx_ova/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_ova/aliases +++ b/tests/integration/targets/ntnx_ova/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_permissions_info/aliases b/tests/integration/targets/ntnx_permissions_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_permissions_info/aliases +++ b/tests/integration/targets/ntnx_permissions_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_projects/aliases b/tests/integration/targets/ntnx_projects/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_projects/aliases +++ b/tests/integration/targets/ntnx_projects/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_projects_info/aliases b/tests/integration/targets/ntnx_projects_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_projects_info/aliases +++ b/tests/integration/targets/ntnx_projects_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_roles/aliases b/tests/integration/targets/ntnx_roles/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_roles/aliases +++ b/tests/integration/targets/ntnx_roles/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_roles_info/aliases b/tests/integration/targets/ntnx_roles_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_roles_info/aliases +++ b/tests/integration/targets/ntnx_roles_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_security_rules/aliases b/tests/integration/targets/ntnx_security_rules/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_security_rules/aliases +++ b/tests/integration/targets/ntnx_security_rules/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_security_rules_info/aliases b/tests/integration/targets/ntnx_security_rules_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_security_rules_info/aliases +++ b/tests/integration/targets/ntnx_security_rules_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_service_groups/aliases b/tests/integration/targets/ntnx_service_groups/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_service_groups/aliases +++ b/tests/integration/targets/ntnx_service_groups/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_service_groups_info/aliases b/tests/integration/targets/ntnx_service_groups_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_service_groups_info/aliases +++ b/tests/integration/targets/ntnx_service_groups_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_static_routes/aliases b/tests/integration/targets/ntnx_static_routes/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_static_routes/aliases +++ b/tests/integration/targets/ntnx_static_routes/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_static_routes_info/aliases b/tests/integration/targets/ntnx_static_routes_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_static_routes_info/aliases +++ b/tests/integration/targets/ntnx_static_routes_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_user_groups/aliases b/tests/integration/targets/ntnx_user_groups/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_user_groups/aliases +++ b/tests/integration/targets/ntnx_user_groups/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_users/aliases b/tests/integration/targets/ntnx_users/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_users/aliases +++ b/tests/integration/targets/ntnx_users/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_users_info/aliases b/tests/integration/targets/ntnx_users_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_users_info/aliases +++ b/tests/integration/targets/ntnx_users_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_vms_clone/aliases b/tests/integration/targets/ntnx_vms_clone/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_vms_clone/aliases +++ b/tests/integration/targets/ntnx_vms_clone/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_floating_ips/aliases b/tests/integration/targets/nutanix_floating_ips/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_floating_ips/aliases +++ b/tests/integration/targets/nutanix_floating_ips/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_floating_ips_info/aliases b/tests/integration/targets/nutanix_floating_ips_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_floating_ips_info/aliases +++ b/tests/integration/targets/nutanix_floating_ips_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_pbrs/aliases b/tests/integration/targets/nutanix_pbrs/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_pbrs/aliases +++ b/tests/integration/targets/nutanix_pbrs/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_pbrs_info/aliases b/tests/integration/targets/nutanix_pbrs_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_pbrs_info/aliases +++ b/tests/integration/targets/nutanix_pbrs_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_subnets/aliases b/tests/integration/targets/nutanix_subnets/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_subnets/aliases +++ b/tests/integration/targets/nutanix_subnets/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_subnets_info/aliases b/tests/integration/targets/nutanix_subnets_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_subnets_info/aliases +++ b/tests/integration/targets/nutanix_subnets_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_vms/aliases b/tests/integration/targets/nutanix_vms/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_vms/aliases +++ b/tests/integration/targets/nutanix_vms/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_vms_info/aliases b/tests/integration/targets/nutanix_vms_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_vms_info/aliases +++ b/tests/integration/targets/nutanix_vms_info/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_vpcs/aliases b/tests/integration/targets/nutanix_vpcs/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_vpcs/aliases +++ b/tests/integration/targets/nutanix_vpcs/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/nutanix_vpcs_info/aliases b/tests/integration/targets/nutanix_vpcs_info/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/nutanix_vpcs_info/aliases +++ b/tests/integration/targets/nutanix_vpcs_info/aliases @@ -0,0 +1 @@ +disabled From ba88a29451e857174516cc45ad623a2f258968f6 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 19:36:16 +0530 Subject: [PATCH 33/38] Minor fix --- .../targets/ntnx_foundation_sanity/tasks/image_nodes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml index 9968d60e2..46056d0da 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml +++ b/tests/integration/targets/ntnx_foundation_sanity/tasks/image_nodes.yml @@ -102,7 +102,7 @@ "hypervisor_gateway": "{{hypervisor_gateway}}", "hypervisor_iso": {}, "hypervisor_netmask": "{{hypervisor_netmask}}", - "ipmi_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", + "ipmi_user": "{{default_ipmi_user}}", "nos_package": "{{images.aos_packages[0]}}" } From 1f86c15b0e388603d1baf16c0b34364dc358d5cf Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 21:55:24 +0530 Subject: [PATCH 34/38] Revert "Disable pc tests" This reverts commit be1a11d137d56e0d827af073c9a4e1c4379c7e7b. --- tests/integration/targets/ntnx_acps/aliases | 1 - tests/integration/targets/ntnx_acps_info/aliases | 1 - tests/integration/targets/ntnx_address_groups/aliases | 1 - tests/integration/targets/ntnx_address_groups_info/aliases | 1 - tests/integration/targets/ntnx_categories/aliases | 1 - tests/integration/targets/ntnx_categories_info/aliases | 1 - tests/integration/targets/ntnx_clusters_info/aliases | 1 - tests/integration/targets/ntnx_hosts_info/aliases | 1 - .../targets/ntnx_image_placement_policies_info/aliases | 1 - tests/integration/targets/ntnx_image_placement_policy/aliases | 1 - tests/integration/targets/ntnx_images/aliases | 1 - tests/integration/targets/ntnx_images_info/aliases | 1 - tests/integration/targets/ntnx_karbon_clusters_and_info/aliases | 1 - tests/integration/targets/ntnx_ndb_databases_sanity/aliases | 1 - tests/integration/targets/ntnx_ova/aliases | 1 - tests/integration/targets/ntnx_permissions_info/aliases | 1 - tests/integration/targets/ntnx_projects/aliases | 1 - tests/integration/targets/ntnx_projects_info/aliases | 1 - tests/integration/targets/ntnx_roles/aliases | 1 - tests/integration/targets/ntnx_roles_info/aliases | 1 - tests/integration/targets/ntnx_security_rules/aliases | 1 - tests/integration/targets/ntnx_security_rules_info/aliases | 1 - tests/integration/targets/ntnx_service_groups/aliases | 1 - tests/integration/targets/ntnx_service_groups_info/aliases | 1 - tests/integration/targets/ntnx_static_routes/aliases | 1 - tests/integration/targets/ntnx_static_routes_info/aliases | 1 - tests/integration/targets/ntnx_user_groups/aliases | 1 - tests/integration/targets/ntnx_users/aliases | 1 - tests/integration/targets/ntnx_users_info/aliases | 1 - tests/integration/targets/ntnx_vms_clone/aliases | 1 - tests/integration/targets/nutanix_floating_ips/aliases | 1 - tests/integration/targets/nutanix_floating_ips_info/aliases | 1 - tests/integration/targets/nutanix_pbrs/aliases | 1 - tests/integration/targets/nutanix_pbrs_info/aliases | 1 - tests/integration/targets/nutanix_subnets/aliases | 1 - tests/integration/targets/nutanix_subnets_info/aliases | 1 - tests/integration/targets/nutanix_vms/aliases | 1 - tests/integration/targets/nutanix_vms_info/aliases | 1 - tests/integration/targets/nutanix_vpcs/aliases | 1 - tests/integration/targets/nutanix_vpcs_info/aliases | 1 - 40 files changed, 40 deletions(-) diff --git a/tests/integration/targets/ntnx_acps/aliases b/tests/integration/targets/ntnx_acps/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_acps/aliases +++ b/tests/integration/targets/ntnx_acps/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_acps_info/aliases b/tests/integration/targets/ntnx_acps_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_acps_info/aliases +++ b/tests/integration/targets/ntnx_acps_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_address_groups/aliases b/tests/integration/targets/ntnx_address_groups/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_address_groups/aliases +++ b/tests/integration/targets/ntnx_address_groups/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_address_groups_info/aliases b/tests/integration/targets/ntnx_address_groups_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_address_groups_info/aliases +++ b/tests/integration/targets/ntnx_address_groups_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_categories/aliases b/tests/integration/targets/ntnx_categories/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_categories/aliases +++ b/tests/integration/targets/ntnx_categories/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_categories_info/aliases b/tests/integration/targets/ntnx_categories_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_categories_info/aliases +++ b/tests/integration/targets/ntnx_categories_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_clusters_info/aliases b/tests/integration/targets/ntnx_clusters_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_clusters_info/aliases +++ b/tests/integration/targets/ntnx_clusters_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_hosts_info/aliases b/tests/integration/targets/ntnx_hosts_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_hosts_info/aliases +++ b/tests/integration/targets/ntnx_hosts_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_image_placement_policies_info/aliases b/tests/integration/targets/ntnx_image_placement_policies_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_image_placement_policies_info/aliases +++ b/tests/integration/targets/ntnx_image_placement_policies_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_image_placement_policy/aliases b/tests/integration/targets/ntnx_image_placement_policy/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/aliases +++ b/tests/integration/targets/ntnx_image_placement_policy/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_images/aliases b/tests/integration/targets/ntnx_images/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_images/aliases +++ b/tests/integration/targets/ntnx_images/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_images_info/aliases b/tests/integration/targets/ntnx_images_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_images_info/aliases +++ b/tests/integration/targets/ntnx_images_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases b/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases +++ b/tests/integration/targets/ntnx_karbon_clusters_and_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_ova/aliases b/tests/integration/targets/ntnx_ova/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_ova/aliases +++ b/tests/integration/targets/ntnx_ova/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_permissions_info/aliases b/tests/integration/targets/ntnx_permissions_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_permissions_info/aliases +++ b/tests/integration/targets/ntnx_permissions_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_projects/aliases b/tests/integration/targets/ntnx_projects/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_projects/aliases +++ b/tests/integration/targets/ntnx_projects/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_projects_info/aliases b/tests/integration/targets/ntnx_projects_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_projects_info/aliases +++ b/tests/integration/targets/ntnx_projects_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_roles/aliases b/tests/integration/targets/ntnx_roles/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_roles/aliases +++ b/tests/integration/targets/ntnx_roles/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_roles_info/aliases b/tests/integration/targets/ntnx_roles_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_roles_info/aliases +++ b/tests/integration/targets/ntnx_roles_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_security_rules/aliases b/tests/integration/targets/ntnx_security_rules/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_security_rules/aliases +++ b/tests/integration/targets/ntnx_security_rules/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_security_rules_info/aliases b/tests/integration/targets/ntnx_security_rules_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_security_rules_info/aliases +++ b/tests/integration/targets/ntnx_security_rules_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_service_groups/aliases b/tests/integration/targets/ntnx_service_groups/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_service_groups/aliases +++ b/tests/integration/targets/ntnx_service_groups/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_service_groups_info/aliases b/tests/integration/targets/ntnx_service_groups_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_service_groups_info/aliases +++ b/tests/integration/targets/ntnx_service_groups_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_static_routes/aliases b/tests/integration/targets/ntnx_static_routes/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_static_routes/aliases +++ b/tests/integration/targets/ntnx_static_routes/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_static_routes_info/aliases b/tests/integration/targets/ntnx_static_routes_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_static_routes_info/aliases +++ b/tests/integration/targets/ntnx_static_routes_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_user_groups/aliases b/tests/integration/targets/ntnx_user_groups/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_user_groups/aliases +++ b/tests/integration/targets/ntnx_user_groups/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_users/aliases b/tests/integration/targets/ntnx_users/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_users/aliases +++ b/tests/integration/targets/ntnx_users/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_users_info/aliases b/tests/integration/targets/ntnx_users_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_users_info/aliases +++ b/tests/integration/targets/ntnx_users_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/ntnx_vms_clone/aliases b/tests/integration/targets/ntnx_vms_clone/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/ntnx_vms_clone/aliases +++ b/tests/integration/targets/ntnx_vms_clone/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_floating_ips/aliases b/tests/integration/targets/nutanix_floating_ips/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_floating_ips/aliases +++ b/tests/integration/targets/nutanix_floating_ips/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_floating_ips_info/aliases b/tests/integration/targets/nutanix_floating_ips_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_floating_ips_info/aliases +++ b/tests/integration/targets/nutanix_floating_ips_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_pbrs/aliases b/tests/integration/targets/nutanix_pbrs/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_pbrs/aliases +++ b/tests/integration/targets/nutanix_pbrs/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_pbrs_info/aliases b/tests/integration/targets/nutanix_pbrs_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_pbrs_info/aliases +++ b/tests/integration/targets/nutanix_pbrs_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_subnets/aliases b/tests/integration/targets/nutanix_subnets/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_subnets/aliases +++ b/tests/integration/targets/nutanix_subnets/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_subnets_info/aliases b/tests/integration/targets/nutanix_subnets_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_subnets_info/aliases +++ b/tests/integration/targets/nutanix_subnets_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_vms/aliases b/tests/integration/targets/nutanix_vms/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_vms/aliases +++ b/tests/integration/targets/nutanix_vms/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_vms_info/aliases b/tests/integration/targets/nutanix_vms_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_vms_info/aliases +++ b/tests/integration/targets/nutanix_vms_info/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_vpcs/aliases b/tests/integration/targets/nutanix_vpcs/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_vpcs/aliases +++ b/tests/integration/targets/nutanix_vpcs/aliases @@ -1 +0,0 @@ -disabled diff --git a/tests/integration/targets/nutanix_vpcs_info/aliases b/tests/integration/targets/nutanix_vpcs_info/aliases index 7a68b11da..e69de29bb 100644 --- a/tests/integration/targets/nutanix_vpcs_info/aliases +++ b/tests/integration/targets/nutanix_vpcs_info/aliases @@ -1 +0,0 @@ -disabled From 167bc25c2a24a875a92b0fa0395a322f5d5c833d Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Fri, 15 Mar 2024 21:56:26 +0530 Subject: [PATCH 35/38] Disabled foundation and database to run only PC tests --- tests/integration/targets/ntnx_foundation_sanity/aliases | 1 + tests/integration/targets/ntnx_ndb_databases_sanity/aliases | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integration/targets/ntnx_foundation_sanity/aliases b/tests/integration/targets/ntnx_foundation_sanity/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_foundation_sanity/aliases +++ b/tests/integration/targets/ntnx_foundation_sanity/aliases @@ -0,0 +1 @@ +disabled diff --git a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases index e69de29bb..7a68b11da 100644 --- a/tests/integration/targets/ntnx_ndb_databases_sanity/aliases +++ b/tests/integration/targets/ntnx_ndb_databases_sanity/aliases @@ -0,0 +1 @@ +disabled From ec9b3a1c8a3c9284c61c7cd4a26af0008aa08cd5 Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Sat, 16 Mar 2024 00:43:16 +0530 Subject: [PATCH 36/38] Release notes update --- CHANGELOG.rst | 10 ++++++++++ README.md | 6 ++---- changelogs/changelog.yaml | 6 ++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 90345a08d..5e591a7db 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,11 @@ Nutanix.Ncp Release Notes v1.9.1 ====== +Release Summary +--------------- + +This release included bug fixes and improvement. We have also deprecated support for ansible-core less than v2.14.0 + Minor Changes ------------- @@ -21,6 +26,11 @@ Minor Changes - ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)] - ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)] +Breaking Changes / Porting Guide +-------------------------------- + +- nutanix.ncp collection - Due to all versions of ansible-core less than v2.14.0 are EOL, we are also deprecating support for same and minimum version to use this collection is ansible-core==2.14.0 + Bugfixes -------- diff --git a/README.md b/README.md index 8b815f98f..e8c2f5753 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,10 @@ Ansible Nutanix Provider leverages the community-supported model. See [Open Sour # Version compatibility ## Ansible -This collection and examples has been tested against following versions : - 1. ansible==5.0.1 - 2. ansible-core==2.12.3 +This collection requires ansible-core>=2.14.0 ## Python -This collection requires Python 2.7 or greater +This collection requires Python 3.9 or greater ## Prism Central > For the 1.1.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc2022.1.0.2, pc.2021.9.0.5 and pc.2021.8.0.1. diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 8b6e643af..a76206f54 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -419,6 +419,10 @@ releases: release_date: '2023-07-11' 1.9.1: changes: + breaking_changes: + - nutanix.ncp collection - Due to all versions of ansible-core less than v2.14.0 + are EOL, we are also deprecating support for same and minimum version to use + this collection is ansible-core==2.14.0 bugfixes: - ntnx_foundation - [Bug] Error when Clusters Block is missing in module ntnx_foundation [[\#397](https://github.com/nutanix/nutanix.ansible/issues/397)] @@ -447,4 +451,6 @@ releases: - ntnx_vms - owner association upon vm creation module [[\#359](https://github.com/nutanix/nutanix.ansible/issues/359)] - ntnx_vms_info - [Imprv] add examples with guest customization for module ntnx_vms [[\#395](https://github.com/nutanix/nutanix.ansible/issues/395)] + release_summary: This release included bug fixes and improvement. We have also + deprecated support for ansible-core less than v2.14.0 release_date: '2023-10-09' From 2fe63a9a69006593e24d32f9556333862fcbdfdb Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Sat, 16 Mar 2024 01:17:10 +0530 Subject: [PATCH 37/38] Lint fxies --- _config.yml | 2 +- examples/README.md | 2 +- examples/acp_info.yml | 2 +- examples/category_crud.yml | 16 +-- examples/clusters_info.yml | 2 +- examples/fc/api_keys_create.yml | 4 +- examples/fc/api_keys_info.yml | 8 +- examples/fc/fc.yml | 2 +- examples/fc/imaged_cluster_info.yml | 2 +- examples/fc/imaged_nodes_info.yml | 4 +- examples/fip.yml | 4 +- examples/fip_info.yml | 2 +- examples/foundation/get_images_info.yml | 4 +- examples/foundation/image_nodes.yml | 6 +- examples/foundation/ipmi_config.yml | 2 +- .../node_discovery_network_info.yml | 6 +- examples/hosts_info.yml | 2 +- examples/iaas/iaas.yml | 2 +- .../external_subnet/tasks/external_subnet.yml | 6 +- .../iaas/roles/external_subnet/tasks/main.yml | 2 +- examples/iaas/roles/fip/tasks/fip.yml | 2 +- .../overlay_subnet/tasks/overlay_subnet.yml | 2 +- examples/iaas/roles/pbr/tasks/pbr.yml | 2 +- .../roles/pbr_delete/tasks/pbr_delete.yml | 2 +- .../roles/static_route/tasks/static_route.yml | 2 +- examples/iaas/roles/vm/tasks/main.yml | 2 +- examples/iaas/roles/vm/tasks/vm.yml | 2 +- examples/iaas/roles/vpc/tasks/vpc.yml | 2 +- examples/images.yml | 3 +- examples/inventory/ansible.cfg | 2 - examples/inventory/nutanix.yaml | 2 +- examples/karbon/cluster_info.yml | 4 +- examples/karbon/create_k8s_cluster.yml | 10 +- examples/karbon/create_registries.yml | 4 +- examples/karbon/registries_info.yml | 2 +- examples/ndb/README.md | 4 +- examples/ndb/all_day2_actions.yml | 14 +-- examples/ndb/create_clone.yml | 4 +- examples/ndb/create_stretched_vlan.yml | 4 +- examples/ndb/create_time_machine_cluster.yml | 4 +- examples/ndb/create_vlan.yml | 4 +- examples/ndb/db_server_vms.yml | 16 +-- ...ision_database_on_registered_db_server.yml | 16 +-- examples/ndb/refresh_clone.yml | 2 +- examples/ndb/registr_cluster.yml | 4 +- .../single_instance_postgress_database.yml | 18 +-- .../ndb/soft_delete_database_instance.yml | 4 +- examples/ndb/software_profiles.yml | 2 +- examples/pbr.yml | 2 +- examples/pbr_info.yml | 4 +- examples/permissions_info.yml | 2 +- examples/projects_crud.yml | 10 +- examples/projects_with_role_mapping.yml | 10 +- examples/roles_crud.yml | 14 +-- examples/static_routes.yml | 2 +- examples/subnet.yml | 8 +- examples/subnet_info.yml | 4 +- examples/user-groups.yml | 2 +- examples/user.yml | 4 +- examples/vm_info.yml | 6 +- examples/vm_operations.yml | 4 +- examples/vm_update.yml | 2 +- examples/vpc.yml | 2 +- examples/vpc_info.yml | 4 +- .../targets/ntnx_acps/tasks/create_acps.yml | 2 +- .../targets/ntnx_acps/tasks/delete_acp.yml | 4 +- .../ntnx_acps/tasks/negative_scenarios.yml | 4 +- .../targets/ntnx_acps/tasks/update_acps.yml | 18 +-- .../targets/ntnx_acps_info/meta/main.yml | 2 +- .../targets/ntnx_address_groups/meta/main.yml | 2 +- .../ntnx_address_groups/tasks/create.yml | 10 +- .../ntnx_address_groups/tasks/delete.yml | 8 +- .../ntnx_address_groups/tasks/update.yml | 12 +- .../tasks/address_groups_info.yml | 12 +- .../targets/ntnx_categories/meta/main.yml | 2 +- .../ntnx_categories/tasks/all_operations.yml | 32 ++--- .../targets/ntnx_categories/tasks/main.yml | 2 +- .../ntnx_categories_info/meta/main.yml | 2 +- .../ntnx_categories_info/tasks/info.yml | 8 +- .../tasks/get_clusters_info.yml | 2 +- .../ntnx_foundation/tasks/image_nodes.yml | 2 +- .../tasks/negative_scenarios.yml | 12 +- .../tasks/configure_ipmi.yml | 2 +- .../ntnx_foundation_central/vars/main.yml | 2 +- .../tasks/create_key.yml | 2 +- .../tasks/main.yml | 2 +- .../tasks/get_cluster_info.yml | 14 +-- .../tasks/get_node_info.yml | 8 +- .../tasks/discover_nodes.yml | 2 +- .../ntnx_hosts_info/tasks/get_hosts_info.yml | 2 +- .../meta/main.yml | 2 +- .../tasks/info.yml | 12 +- .../ntnx_image_placement_policy/meta/main.yml | 2 +- .../tasks/create.yml | 18 +-- .../tasks/delete.yml | 10 +- .../tasks/main.yml | 2 +- .../tasks/update.yml | 18 +-- .../targets/ntnx_images/meta/main.yml | 2 +- .../targets/ntnx_images/tasks/create.yml | 10 +- .../targets/ntnx_images/tasks/delete.yml | 8 +- .../targets/ntnx_images/tasks/main.yml | 2 +- .../targets/ntnx_images/tasks/update.yml | 20 +-- .../targets/ntnx_images_info/meta/main.yml | 2 +- .../targets/ntnx_images_info/tasks/info.yml | 8 +- .../tasks/crud.yml | 38 +++--- .../tasks/negative_scenarios.yml | 2 +- .../ntnx_karbon_registries/tasks/create.yml | 2 +- .../tasks/negativ_scenarios.yml | 4 +- .../ntnx_karbon_registries_info/meta/main.yml | 2 +- .../tasks/info.yml | 4 +- .../ntnx_ndb_availability_databases/readme.md | 2 +- .../tasks/tests.yml | 62 +++++----- .../ntnx_ndb_clones_info/meta/main.yml | 2 +- .../ntnx_ndb_clones_info/tasks/info.yml | 4 +- .../targets/ntnx_ndb_clusters/meta/main.yml | 2 +- .../targets/ntnx_ndb_clusters/tasks/CRUD.yml | 6 +- .../ntnx_ndb_database_clones/tasks/clones.yml | 114 +++++++++--------- .../ntnx_ndb_databases_actions/readme.md | 2 +- .../tasks/all_actions.yml | 82 ++++++------- .../readme.md | 2 +- .../tasks/tests.yml | 88 +++++++------- .../readme.md | 2 +- .../tasks/tests.yml | 44 +++---- .../targets/ntnx_ndb_db_server_vms/readme.md | 2 +- .../ntnx_ndb_db_server_vms/tasks/crud.yml | 72 +++++------ .../tasks/crud.yml | 38 +++--- .../targets/ntnx_ndb_profiles/meta/main.yml | 2 +- .../ntnx_ndb_profiles/tasks/compute.yml | 4 +- .../ntnx_ndb_profiles/tasks/db_params.yml | 10 +- .../tasks/network_profile.yml | 24 ++-- .../ntnx_ndb_profiles_info/meta/main.yml | 2 +- .../ntnx_ndb_profiles_info/tasks/info.yml | 12 +- .../targets/ntnx_ndb_slas/meta/main.yml | 2 +- .../targets/ntnx_ndb_slas/tasks/CRUD.yml | 12 +- .../ntnx_ndb_snapshots_info/meta/main.yml | 2 +- .../ntnx_ndb_snapshots_info/tasks/info.yml | 4 +- .../ntnx_ndb_software_profiles/tasks/crud.yml | 6 +- .../targets/ntnx_ndb_tags/tasks/crud.yml | 46 +++---- .../ntnx_ndb_time_machines_info/meta/main.yml | 2 +- .../tasks/info.yml | 4 +- .../meta/main.yml | 2 +- .../data_access_management_and_snapshots.yml | 12 +- .../targets/ntnx_ndb_vlans/meta/main.yml | 2 +- .../ntnx_ndb_vlans/tasks/create_vlans.yml | 6 +- .../tasks/negativ_scenarios.yml | 8 +- .../targets/ntnx_ova/tasks/create_ova.yml | 2 +- .../tasks/permissions_info.yml | 8 +- .../ntnx_projects/tasks/create_project.yml | 12 +- .../tasks/projects_with_role_mappings.yml | 34 +++--- .../ntnx_projects/tasks/update_project.yml | 16 +-- .../tasks/projects_info.yml | 18 +-- .../targets/ntnx_projects_info/vars/main.yml | 2 +- .../targets/ntnx_protection_rules/aliases | 2 +- .../tasks/protection_rules.yml | 10 +- .../ntnx_protection_rules_info/aliases | 2 +- .../tasks/rules_info.yml | 10 +- .../tasks/crud.yml | 16 +-- .../tasks/info.yml | 20 +-- .../targets/ntnx_roles/meta/main.yml | 2 +- .../targets/ntnx_roles/tasks/create.yml | 8 +- .../targets/ntnx_roles/tasks/delete.yml | 6 +- .../targets/ntnx_roles/tasks/update.yml | 8 +- .../ntnx_roles_info/tasks/roles_info.yml | 10 +- .../ntnx_security_rules/tasks/app_rule.yml | 30 ++--- .../tasks/isolation_rule.yml | 8 +- .../tasks/quarantine_rule.yml | 6 +- .../targets/ntnx_security_rules/tasks/vdi.yml | 18 +-- .../tasks/get_security_rules.yml | 4 +- .../targets/ntnx_service_groups/meta/main.yml | 2 +- .../ntnx_service_groups/tasks/create.yml | 20 +-- .../ntnx_service_groups/tasks/main.yml | 2 +- .../ntnx_service_groups/tasks/update.yml | 8 +- .../ntnx_service_groups_info/meta/main.yml | 2 +- .../ntnx_service_groups_info/tasks/info.yml | 2 +- .../ntnx_static_routes/tasks/create.yml | 12 +- .../ntnx_static_routes_info/tasks/info.yml | 12 +- .../targets/ntnx_user_groups/meta/main.yml | 2 +- .../targets/ntnx_user_groups/tasks/create.yml | 12 +- .../targets/ntnx_users/meta/main.yml | 2 +- .../targets/ntnx_users/tasks/create.yml | 12 +- .../ntnx_users_info/tasks/users_info.yml | 10 +- .../targets/ntnx_vms_clone/tasks/create.yml | 14 +-- .../tasks/create_floating_ips.yml | 8 +- .../tasks/negative_scenarios.yml | 2 +- .../nutanix_pbrs/tasks/create_pbrs.yml | 4 +- .../targets/nutanix_pbrs/vars/main.yml | 2 +- .../nutanix_subnets/tasks/create_subnet.yml | 13 +- .../nutanix_subnets/tasks/delete_subnet.yml | 4 +- .../tasks/negative_scenarios.yml | 10 +- .../targets/nutanix_subnets/vars/main.yml | 2 +- .../tasks/list_subnets.yml | 2 +- .../targets/nutanix_vms/tasks/create.yml | 66 +++++----- .../targets/nutanix_vms/tasks/delete.yml | 4 +- .../nutanix_vms/tasks/negtaive_vm_update.yml | 20 +-- .../nutanix_vms/tasks/vm_operations.yml | 16 +-- .../targets/nutanix_vms/tasks/vm_update.yml | 14 +-- .../nutanix_vms_info/tasks/list_vms.yml | 12 +- .../nutanix_vpcs/tasks/negative_scenarios.yml | 6 +- .../targets/prepare_env/tasks/cleanup.yml | 2 +- .../targets/prepare_env/tasks/prepare_env.yml | 18 +-- .../prepare_fc_env/tasks/prepare_fc_env.yml | 2 +- .../prepare_foundation_env/tasks/cleanup.yml | 2 +- .../tasks/prepare_foundation_env.yml | 4 +- .../prepare_ndb_env/tasks/prepare_env.yml | 11 +- 204 files changed, 948 insertions(+), 963 deletions(-) diff --git a/_config.yml b/_config.yml index c4192631f..277f1f2c5 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-cayman \ No newline at end of file +theme: jekyll-theme-cayman diff --git a/examples/README.md b/examples/README.md index 3db7f6b17..1dc9b0c26 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,4 @@ ## Examples Dependency These examples has been tested against following versions : 1. ansible==5.0.1 - 2. ansible-core==2.12.3 \ No newline at end of file + 2. ansible-core==2.12.3 diff --git a/examples/acp_info.yml b/examples/acp_info.yml index a05b6ef64..41850e614 100644 --- a/examples/acp_info.yml +++ b/examples/acp_info.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: List ACPs using ascending, sorting and name filter ntnx_floating_ips_info: filter: diff --git a/examples/category_crud.yml b/examples/category_crud.yml index 5bab0cfc5..3c4c6b12e 100644 --- a/examples/category_crud.yml +++ b/examples/category_crud.yml @@ -24,7 +24,7 @@ values: - "val1" - "val2" - + - name: Create category key with values ntnx_categories: state: "present" @@ -34,7 +34,7 @@ - "val3" - "val4" register: cat2 - + - name: Add more category values to test-cat-2 ntnx_categories: state: "present" @@ -47,28 +47,22 @@ ntnx_categories_info: name: "test-cat-1" register: cat1_info - + - name: Delete val1 category value from test-cat-1 ntnx_categories: state: absent name: "test-cat-1" values: - val1 - + - name: delete all category values from test-cat-1 ntnx_categories: state: absent name: "test-cat-1" remove_values: true - - name: delete category key test-cat-2 including its all values + - name: delete category key test-cat-2 including its all values ntnx_categories: state: absent name: "test-cat-2" remove_values: true - - - - - - \ No newline at end of file diff --git a/examples/clusters_info.yml b/examples/clusters_info.yml index 7eab579f3..c50b8286b 100644 --- a/examples/clusters_info.yml +++ b/examples/clusters_info.yml @@ -11,7 +11,7 @@ nutanix_password: validate_certs: false - tasks: + tasks: - name: test getting all clusters ntnx_clusters_info: register: clusters diff --git a/examples/fc/api_keys_create.yml b/examples/fc/api_keys_create.yml index 6ffaf0e1e..41a5df90c 100644 --- a/examples/fc/api_keys_create.yml +++ b/examples/fc/api_keys_create.yml @@ -14,7 +14,7 @@ validate_certs: false alias: "test-alias" register: output - + - name: output of api_key debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/fc/api_keys_info.yml b/examples/fc/api_keys_info.yml index 431cb5ab8..7ea8513e5 100644 --- a/examples/fc/api_keys_info.yml +++ b/examples/fc/api_keys_info.yml @@ -6,7 +6,7 @@ - nutanix.ncp tasks: - - name: API key response with alias + - name: API key response with alias ntnx_foundation_central_api_keys: nutanix_host: "{{ pc }}" nutanix_username: "{{ username }}" @@ -15,7 +15,7 @@ alias: "test" register: output - - name: API key response with key_uuid + - name: API key response with key_uuid ntnx_foundation_central_api_keys: nutanix_host: "{{ pc }}" nutanix_username: "{{ username }}" @@ -23,7 +23,7 @@ validate_certs: false key_uuid: "" register: output - + - name: output of api_key debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/fc/fc.yml b/examples/fc/fc.yml index 9fcce4e1c..00f9732fb 100644 --- a/examples/fc/fc.yml +++ b/examples/fc/fc.yml @@ -95,6 +95,6 @@ url: "" register: output - - name: output of list + - name: output of list debug: msg: '{{ output }}' diff --git a/examples/fc/imaged_cluster_info.yml b/examples/fc/imaged_cluster_info.yml index a1a138716..6e23546a7 100644 --- a/examples/fc/imaged_cluster_info.yml +++ b/examples/fc/imaged_cluster_info.yml @@ -37,4 +37,4 @@ - name: details of imaged-clusters debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/fc/imaged_nodes_info.yml b/examples/fc/imaged_nodes_info.yml index c0c1ef607..3eda3012d 100644 --- a/examples/fc/imaged_nodes_info.yml +++ b/examples/fc/imaged_nodes_info.yml @@ -35,6 +35,6 @@ model: "" register: output - - name: details of imaged node + - name: details of imaged node debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/fip.yml b/examples/fip.yml index 44f0a7854..0fb7976c2 100644 --- a/examples/fip.yml +++ b/examples/fip.yml @@ -15,7 +15,7 @@ set_fact: external_subnet_name: "" vm_name: "" - + - name: Create floating ip with external subnet uuid ntnx_floating_ips: state: present @@ -24,7 +24,7 @@ name: "{{ external_subnet_name }}" register: result - - name: Assign floating ip to vm + - name: Assign floating ip to vm ntnx_floating_ips: state: present external_subnet: diff --git a/examples/fip_info.yml b/examples/fip_info.yml index 804e9ebd4..3d92c2c20 100644 --- a/examples/fip_info.yml +++ b/examples/fip_info.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: List floating_ips using ascending ip sorting and floating_ip filter ntnx_floating_ips_info: filter: diff --git a/examples/foundation/get_images_info.yml b/examples/foundation/get_images_info.yml index a8d74b665..9ee06f18b 100644 --- a/examples/foundation/get_images_info.yml +++ b/examples/foundation/get_images_info.yml @@ -14,8 +14,8 @@ ntnx_foundation_aos_packages_info: nutanix_host: "10.xx.xx.xx" register: nos - + - debug: msg: "{{ hyp }}" - debug: - msg: "{{ nos }}" \ No newline at end of file + msg: "{{ nos }}" diff --git a/examples/foundation/image_nodes.yml b/examples/foundation/image_nodes.yml index 1490f9fd5..6e2b7cb58 100644 --- a/examples/foundation/image_nodes.yml +++ b/examples/foundation/image_nodes.yml @@ -1,4 +1,4 @@ -# Here we will image three kind of nodes with different methods. +# Here we will image three kind of nodes with different methods. # We will image one node using manual mode. Second node, which can be dos running node, will be imaged using discovery mode using cvm # Third node, which can be nutanix imaged(aos running) node, will be imaged using discovery mode using IPMI - name: Image nodes @@ -52,7 +52,7 @@ hypervisor_hostname: "superman3" clusters: - redundancy_factor: 2 - cluster_members: + cluster_members: - "10.xx.xx.xx" - "10.xx.xx.xx" - "10.xx.xx.xx" @@ -60,4 +60,4 @@ register: output - debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/foundation/ipmi_config.yml b/examples/foundation/ipmi_config.yml index a3a6d3f4a..20fce2b9f 100644 --- a/examples/foundation/ipmi_config.yml +++ b/examples/foundation/ipmi_config.yml @@ -20,4 +20,4 @@ register: output - debug: - msg: '{{ output }}' \ No newline at end of file + msg: '{{ output }}' diff --git a/examples/foundation/node_discovery_network_info.yml b/examples/foundation/node_discovery_network_info.yml index 40bb7d017..2f81eb083 100644 --- a/examples/foundation/node_discovery_network_info.yml +++ b/examples/foundation/node_discovery_network_info.yml @@ -11,7 +11,7 @@ # unskip line 12 to include configured(nodes part of cluster) nodes in the output # include_configured: true register: discovered_nodes - + # get network info of nodes discovered from ntnx_foundation_discover_nodes_info module - name: Get node network info of some discovered nodes ntnx_foundation_node_network_info: @@ -21,5 +21,5 @@ - "{{discovered_nodes.blocks.1.nodes.0.ipv6_address}}" register: result - - debug: - msg: "{{ result }}" \ No newline at end of file + - debug: + msg: "{{ result }}" diff --git a/examples/hosts_info.yml b/examples/hosts_info.yml index 1984cc41c..f478b5249 100644 --- a/examples/hosts_info.yml +++ b/examples/hosts_info.yml @@ -11,7 +11,7 @@ nutanix_password: validate_certs: false - tasks: + tasks: - name: test getting all hosts ntnx_hosts_info: register: hosts diff --git a/examples/iaas/iaas.yml b/examples/iaas/iaas.yml index 736e84a52..1275e3521 100644 --- a/examples/iaas/iaas.yml +++ b/examples/iaas/iaas.yml @@ -3,7 +3,7 @@ hosts: localhost gather_facts: false collections: - - nutanix.ncp + - nutanix.ncp module_defaults: group/nutanix.ncp.ntnx: nutanix_host: diff --git a/examples/iaas/roles/external_subnet/tasks/external_subnet.yml b/examples/iaas/roles/external_subnet/tasks/external_subnet.yml index 651191bea..b4c232d4e 100644 --- a/examples/iaas/roles/external_subnet/tasks/external_subnet.yml +++ b/examples/iaas/roles/external_subnet/tasks/external_subnet.yml @@ -17,6 +17,6 @@ end_ip: "{{ item.eip }}" register: external_network - debug: - msg: - - "name: Ext_Nat" - - "uuid: {{ external_network.subnet_uuid }}" \ No newline at end of file + msg: + - "name: Ext_Nat" + - "uuid: {{ external_network.subnet_uuid }}" diff --git a/examples/iaas/roles/external_subnet/tasks/main.yml b/examples/iaas/roles/external_subnet/tasks/main.yml index f0e2653a4..d0a8dcff9 100644 --- a/examples/iaas/roles/external_subnet/tasks/main.yml +++ b/examples/iaas/roles/external_subnet/tasks/main.yml @@ -2,4 +2,4 @@ - name: Inputs for external subnets task include_tasks: external_subnet.yml with_items: - - { name: "{{external_subnet.name}}", vlan_id: "{{external_subnet.vlan_id}}", ip: "{{external_subnet.ip}}", prefix: "{{external_subnet.prefix}}", gip: "{{external_subnet.gip}}", sip: "{{external_subnet.sip}}", eip: "{{external_subnet.eip}}", eNat: "{{external_subnet.eNat}}" } \ No newline at end of file + - { name: "{{external_subnet.name}}", vlan_id: "{{external_subnet.vlan_id}}", ip: "{{external_subnet.ip}}", prefix: "{{external_subnet.prefix}}", gip: "{{external_subnet.gip}}", sip: "{{external_subnet.sip}}", eip: "{{external_subnet.eip}}", eNat: "{{external_subnet.eNat}}" } diff --git a/examples/iaas/roles/fip/tasks/fip.yml b/examples/iaas/roles/fip/tasks/fip.yml index 73cc943c3..9db0eda42 100644 --- a/examples/iaas/roles/fip/tasks/fip.yml +++ b/examples/iaas/roles/fip/tasks/fip.yml @@ -10,4 +10,4 @@ - debug: msg: - "VM name: {{ item.vm_name }}" - - "uuid: {{ fip.fip_uuid }}" \ No newline at end of file + - "uuid: {{ fip.fip_uuid }}" diff --git a/examples/iaas/roles/overlay_subnet/tasks/overlay_subnet.yml b/examples/iaas/roles/overlay_subnet/tasks/overlay_subnet.yml index b6b16ea5c..50866ba23 100644 --- a/examples/iaas/roles/overlay_subnet/tasks/overlay_subnet.yml +++ b/examples/iaas/roles/overlay_subnet/tasks/overlay_subnet.yml @@ -21,4 +21,4 @@ - debug: msg: - "name: {{ overlay.response.status.name }}" - - "uuid: {{ overlay.subnet_uuid }}" \ No newline at end of file + - "uuid: {{ overlay.subnet_uuid }}" diff --git a/examples/iaas/roles/pbr/tasks/pbr.yml b/examples/iaas/roles/pbr/tasks/pbr.yml index 008c9844e..760c69621 100644 --- a/examples/iaas/roles/pbr/tasks/pbr.yml +++ b/examples/iaas/roles/pbr/tasks/pbr.yml @@ -19,4 +19,4 @@ - debug: msg: - "vpc_name: {{ item.vpc_name }}" - - "uuid: {{ pbr.pbr_uuid }}" \ No newline at end of file + - "uuid: {{ pbr.pbr_uuid }}" diff --git a/examples/iaas/roles/pbr_delete/tasks/pbr_delete.yml b/examples/iaas/roles/pbr_delete/tasks/pbr_delete.yml index 9d21d90f0..dd2562cf1 100644 --- a/examples/iaas/roles/pbr_delete/tasks/pbr_delete.yml +++ b/examples/iaas/roles/pbr_delete/tasks/pbr_delete.yml @@ -6,4 +6,4 @@ register: pbr - debug: msg: - - "uuid: {{ pbr.pbr_uuid }}" \ No newline at end of file + - "uuid: {{ pbr.pbr_uuid }}" diff --git a/examples/iaas/roles/static_route/tasks/static_route.yml b/examples/iaas/roles/static_route/tasks/static_route.yml index 1163f36dd..924571431 100644 --- a/examples/iaas/roles/static_route/tasks/static_route.yml +++ b/examples/iaas/roles/static_route/tasks/static_route.yml @@ -10,5 +10,5 @@ name: "{{ item.subnet_name }}" register: static_route - debug: - msg: + msg: - "uuid: {{ static_route.response.metadata.uuid }}" diff --git a/examples/iaas/roles/vm/tasks/main.yml b/examples/iaas/roles/vm/tasks/main.yml index 832335cef..7c3949250 100644 --- a/examples/iaas/roles/vm/tasks/main.yml +++ b/examples/iaas/roles/vm/tasks/main.yml @@ -5,4 +5,4 @@ - {name: "Prod-Wordpress-App", desc: "Prod-Wordpress-App", is_connected: True, subnet_name: "{{Prod_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""} - {name: "Prod-Wordpress-DB", desc: "Prod-Wordpress-DB", is_connected: True, subnet_name: "{{Prod_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5} - {name: "Dev-Wordpress-App", desc: "Dev-Wordpress-App", is_connected: True, subnet_name: "{{Dev_SubnetA.name}}", image_name: "wordpress-appserver", private_ip: ""} - - {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: "{{Dev_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5} \ No newline at end of file + - {name: "Dev-Wordpress-DB", desc: "Dev-Wordpress-DB", is_connected: True, subnet_name: "{{Dev_SubnetB.name}}", image_name: "wordpress-db", private_ip: 10.1.2.5} diff --git a/examples/iaas/roles/vm/tasks/vm.yml b/examples/iaas/roles/vm/tasks/vm.yml index d866fe0ef..ca2332e4c 100644 --- a/examples/iaas/roles/vm/tasks/vm.yml +++ b/examples/iaas/roles/vm/tasks/vm.yml @@ -21,4 +21,4 @@ - debug: msg: - "name: {{ vm.response.status.name }}" - - "uuid: {{ vm.vm_uuid }}" \ No newline at end of file + - "uuid: {{ vm.vm_uuid }}" diff --git a/examples/iaas/roles/vpc/tasks/vpc.yml b/examples/iaas/roles/vpc/tasks/vpc.yml index ebb989d09..a87d5b5d2 100644 --- a/examples/iaas/roles/vpc/tasks/vpc.yml +++ b/examples/iaas/roles/vpc/tasks/vpc.yml @@ -11,4 +11,4 @@ - "name: {{ vpc.response.status.name }}" - "uuid: {{ vpc.vpc_uuid }}" - set_fact: - vpc_uuids: "{{ vpc_uuids + [ vpc.vpc_uuid ] }}" \ No newline at end of file + vpc_uuids: "{{ vpc_uuids + [ vpc.vpc_uuid ] }}" diff --git a/examples/images.yml b/examples/images.yml index 1b19a917e..82f11491d 100644 --- a/examples/images.yml +++ b/examples/images.yml @@ -17,7 +17,7 @@ source_path: "" source_uri: "" clusters_name: "" - + - name: create image from local workstation ntnx_images: state: "present" @@ -81,4 +81,3 @@ state: "absent" image_uuid: "00000000-0000-0000-0000-000000000000" wait: true - \ No newline at end of file diff --git a/examples/inventory/ansible.cfg b/examples/inventory/ansible.cfg index 7c5781ba3..0dd8c2275 100644 --- a/examples/inventory/ansible.cfg +++ b/examples/inventory/ansible.cfg @@ -3,5 +3,3 @@ inventory = nutanix.yaml [inventory] enable_plugins = nutanix.ncp.ntnx_prism_vm_inventory - - diff --git a/examples/inventory/nutanix.yaml b/examples/inventory/nutanix.yaml index b38ba655e..89f3c20ce 100644 --- a/examples/inventory/nutanix.yaml +++ b/examples/inventory/nutanix.yaml @@ -10,4 +10,4 @@ groups: keyed_groups: - prefix: "host" separator: ':' - key: "ansible_host" \ No newline at end of file + key: "ansible_host" diff --git a/examples/karbon/cluster_info.yml b/examples/karbon/cluster_info.yml index 937073c32..b5e916b25 100644 --- a/examples/karbon/cluster_info.yml +++ b/examples/karbon/cluster_info.yml @@ -11,11 +11,11 @@ nutanix_password: validate_certs: false - tasks: + tasks: - set_fact: cluster_name: - - name: test getting cluster using name + - name: test getting cluster using name ntnx_karbon_clusters_info: cluster_name: "{{cluster_name}}" register: result diff --git a/examples/karbon/create_k8s_cluster.yml b/examples/karbon/create_k8s_cluster.yml index e4740b2d0..689975485 100644 --- a/examples/karbon/create_k8s_cluster.yml +++ b/examples/karbon/create_k8s_cluster.yml @@ -11,7 +11,7 @@ nutanix_password: validate_certs: false - tasks: + tasks: - set_fact: cluster: name: @@ -61,7 +61,7 @@ file_system: ext4 flash_mode: False register: result - + - name: delete dev cluster ntnx_karbon_clusters: state: absent @@ -109,7 +109,7 @@ flash_mode: true register: result - - name: Create worker node pool with subnet uuid + - name: Create worker node pool with subnet uuid ntnx_karbon_clusters_node_pools: node_subnet: uuid: "" @@ -119,7 +119,7 @@ num_instances: 2 cpu: 4 memory_gb: 8 - disk_gb: 120 + disk_gb: 120 register: result ignore_errors: true @@ -179,4 +179,4 @@ cpu: 8 memory_gb: 8 disk_gb: 240 - register: result \ No newline at end of file + register: result diff --git a/examples/karbon/create_registries.yml b/examples/karbon/create_registries.yml index 70f40c2d3..42c75e310 100644 --- a/examples/karbon/create_registries.yml +++ b/examples/karbon/create_registries.yml @@ -1,5 +1,5 @@ --- -- name: create registeries +- name: create registeries hosts: localhost gather_facts: false collections: @@ -11,7 +11,7 @@ nutanix_password: validate_certs: false - tasks: + tasks: - set_fact: registry_name: url: diff --git a/examples/karbon/registries_info.yml b/examples/karbon/registries_info.yml index 122f2d019..81c2d8742 100644 --- a/examples/karbon/registries_info.yml +++ b/examples/karbon/registries_info.yml @@ -1,5 +1,5 @@ --- -- name: get registeries info +- name: get registeries info hosts: localhost gather_facts: false collections: diff --git a/examples/ndb/README.md b/examples/ndb/README.md index dbe51d2f3..761d0ec59 100644 --- a/examples/ndb/README.md +++ b/examples/ndb/README.md @@ -84,7 +84,7 @@ Example playbook task to deploy single instance postgres type database in NDB is create_new_server: name: postgres_server_ansible password: temp_password - cluster: + cluster: name: TempCluster software_profile: name: POSTGRES_10.4_OOB @@ -93,7 +93,7 @@ Example playbook task to deploy single instance postgres type database in NDB is compute_profile: name: DEFAULT_OOB_SMALL_COMPUTE pub_ssh_key: "" - + postgres: listener_port: "5432" db_name: test_ansible diff --git a/examples/ndb/all_day2_actions.yml b/examples/ndb/all_day2_actions.yml index 9320ae047..4322a1302 100644 --- a/examples/ndb/all_day2_actions.yml +++ b/examples/ndb/all_day2_actions.yml @@ -35,14 +35,14 @@ ntnx_ndb_database_snapshots: name: "{{snapshot_name}}2" time_machine_uuid: "{{time_machine_uuid}}" - expiry_days: 4 + expiry_days: 4 register: result - set_fact: snapshot_uuid: "{{result.snapshot_uuid}}" - name: rename snapshot - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" name: "{{snapshot_name}}2-updated" register: result @@ -54,13 +54,13 @@ register: result - name: remove expiry schedule - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" remove_expiry: true register: result - name: Add expiry schedule and rename - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" name: "{{snapshot_name}}2" expiry_days: 6 @@ -101,7 +101,7 @@ db_uuid: "{{db_uuid}}" snapshot_uuid: "{{snapshot_uuid}}" register: result - + ########################################### scaling ########################################### - name: extend database storage for scaling database @@ -118,7 +118,7 @@ - name: add databases in database instance ntnx_ndb_linked_databases: db_instance_uuid: "{{db_uuid}}" - databases: + databases: - test1 - test2 register: result @@ -127,5 +127,5 @@ ntnx_ndb_linked_databases: state: "absent" db_instance_uuid: "{{db_uuid}}" - database_uuid: "{{linked_databases.test1}}" + database_uuid: "{{linked_databases.test1}}" register: result diff --git a/examples/ndb/create_clone.yml b/examples/ndb/create_clone.yml index d2533e4f7..468058423 100644 --- a/examples/ndb/create_clone.yml +++ b/examples/ndb/create_clone.yml @@ -75,7 +75,7 @@ - debug: msg: "{{output}}" - + - name: create clone using point in time ntnx_ndb_database_clones: name: "{{clone_db.name}}" @@ -116,6 +116,6 @@ time: "12:00:00" timezone: "Asia/Calcutta" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/create_stretched_vlan.yml b/examples/ndb/create_stretched_vlan.yml index 37b162c48..29e6c9e20 100644 --- a/examples/ndb/create_stretched_vlan.yml +++ b/examples/ndb/create_stretched_vlan.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: Create stretched vlan ntnx_ndb_stretched_vlans: name: "{{st_vlan.name}}" @@ -21,6 +21,6 @@ - "" - "" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/create_time_machine_cluster.yml b/examples/ndb/create_time_machine_cluster.yml index b8dc44fda..95f23a22a 100644 --- a/examples/ndb/create_time_machine_cluster.yml +++ b/examples/ndb/create_time_machine_cluster.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: NDB time machine's cluster creation ntnx_ndb_time_machine_clusters: time_machine_uuid: "{{time_machine.uuid}}" @@ -22,6 +22,6 @@ name: "{{sla.name}}" type: "{{type}}" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/create_vlan.yml b/examples/ndb/create_vlan.yml index 48e967731..a77864d95 100644 --- a/examples/ndb/create_vlan.yml +++ b/examples/ndb/create_vlan.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: Create Dhcp ndb vlan ntnx_ndb_vlans: name: "{{ndb_vlan.name}}" @@ -20,7 +20,7 @@ cluster: uuid: "{{cluster.uuid}}" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/db_server_vms.yml b/examples/ndb/db_server_vms.yml index c7a86122e..7ae35cc47 100644 --- a/examples/ndb/db_server_vms.yml +++ b/examples/ndb/db_server_vms.yml @@ -177,9 +177,9 @@ db_server_clusters: - uuid: "test_cluter_1" - uuid: "test_cluter_2" - maintenance_window: + maintenance_window: name: "{{maintenance.window_name}}" - tasks: + tasks: - type: "OS_PATCHING" pre_task_cmd: "ls -a" post_task_cmd: "ls" @@ -193,7 +193,7 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - uuid: "{{db_server_uuid}}" - maintenance_window: + maintenance_window: uuid: "{{maintenance.window_uuid}}" tasks: [] register: result @@ -203,7 +203,7 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - uuid: "{{db_server_uuid}}" - maintenance_window: + maintenance_window: uuid: "{{maintenance.window_uuid}}" tasks: [] register: result @@ -212,9 +212,9 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - name: "{{vm1_name_updated}}" - maintenance_window: + maintenance_window: name: "{{maintenance.window_name}}" - tasks: + tasks: - type: "OS_PATCHING" pre_task_cmd: "ls -a" post_task_cmd: "ls" @@ -303,7 +303,7 @@ - type: "DB_PATCHING" pre_task_cmd: "ls -l" post_task_cmd: "ls -F" - + register: result ################################### DB server VM Delete tasks ############################# @@ -317,4 +317,4 @@ delete_from_cluster: false delete_vgs: True delete_vm_snapshots: True - register: result \ No newline at end of file + register: result diff --git a/examples/ndb/provision_database_on_registered_db_server.yml b/examples/ndb/provision_database_on_registered_db_server.yml index 36737d145..ca196cc88 100644 --- a/examples/ndb/provision_database_on_registered_db_server.yml +++ b/examples/ndb/provision_database_on_registered_db_server.yml @@ -12,19 +12,19 @@ validate_certs: false tasks: - + - name: Create single instance postgres database on registered db server vm ntnx_ndb_databases: - - name: POSTGRES_DATABASE_ANSIBLE - + + name: POSTGRES_DATABASE_ANSIBLE + db_params_profile: name: DEFAULT_POSTGRES_PARAMS - + db_vm: use_registered_server: name: otiakmxh - + postgres: listener_port: "5432" db_name: prad @@ -35,7 +35,7 @@ name: POSTGRES_DATABASE_ANSIBLE_TM sla: name: DEFAULT_OOB_GOLD_SLA - schedule: + schedule: daily: "11:00:00" weekly: WEDNESDAY monthly: 4 @@ -45,6 +45,6 @@ snapshots_per_day: 2 register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/refresh_clone.yml b/examples/ndb/refresh_clone.yml index c1230d549..3806fb9d9 100644 --- a/examples/ndb/refresh_clone.yml +++ b/examples/ndb/refresh_clone.yml @@ -26,7 +26,7 @@ timezone: "UTC" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/registr_cluster.yml b/examples/ndb/registr_cluster.yml index 589953308..80108160d 100644 --- a/examples/ndb/registr_cluster.yml +++ b/examples/ndb/registr_cluster.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: NDB cluster creation ntnx_ndb_clusters: name: "{{cluster.name}}" @@ -40,6 +40,6 @@ subnet_mask: "{{prism_vlan.subnet_mask}}" storage_container: "{{storage_container.name}}" register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/single_instance_postgress_database.yml b/examples/ndb/single_instance_postgress_database.yml index c1fbb29a6..8f8f83339 100644 --- a/examples/ndb/single_instance_postgress_database.yml +++ b/examples/ndb/single_instance_postgress_database.yml @@ -12,20 +12,20 @@ validate_certs: false tasks: - + - name: Create single instance postgres database ntnx_ndb_databases: - - name: POSTGRES_DATABASE_ANSIBLE - + + name: POSTGRES_DATABASE_ANSIBLE + db_params_profile: name: DEFAULT_POSTGRES_PARAMS - + db_vm: create_new_server: name: postgres_server_ansible password: temp_password - cluster: + cluster: name: EraCluster software_profile: name: POSTGRES_10.4_OOB @@ -34,7 +34,7 @@ compute_profile: name: DEFAULT_OOB_SMALL_COMPUTE pub_ssh_key: "" - + postgres: listener_port: "5432" db_name: prad @@ -45,7 +45,7 @@ name: POSTGRES_DATABASE_ANSIBLE_TM sla: name: DEFAULT_OOB_GOLD_SLA - schedule: + schedule: daily: "11:00:00" weekly: WEDNESDAY monthly: 4 @@ -55,6 +55,6 @@ snapshots_per_day: 2 register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/soft_delete_database_instance.yml b/examples/ndb/soft_delete_database_instance.yml index b569989ea..07b15fab1 100644 --- a/examples/ndb/soft_delete_database_instance.yml +++ b/examples/ndb/soft_delete_database_instance.yml @@ -12,7 +12,7 @@ validate_certs: false tasks: - + - name: Soft delete single instance database and time machine associated ntnx_ndb_databases: state: "absent" @@ -20,6 +20,6 @@ soft_delete: true delete_time_machine: true register: output - + - debug: msg: "{{output}}" diff --git a/examples/ndb/software_profiles.yml b/examples/ndb/software_profiles.yml index b733a93b2..fa22d873c 100644 --- a/examples/ndb/software_profiles.yml +++ b/examples/ndb/software_profiles.yml @@ -183,5 +183,5 @@ - name: delete software profile ntnx_ndb_profiles: profile_uuid: "{{profile_uuid}}" - state: "absent" + state: "absent" register: result diff --git a/examples/pbr.yml b/examples/pbr.yml index 261dae7f7..3e36f8097 100644 --- a/examples/pbr.yml +++ b/examples/pbr.yml @@ -17,7 +17,7 @@ cluster_uuid: "" priority: "" vpc_uuid: "" - + - name: create PBR with vpc uuid with any source or destination or protocol with deny action ntnx_pbrs: state: present diff --git a/examples/pbr_info.yml b/examples/pbr_info.yml index 21022c2ab..d59512893 100644 --- a/examples/pbr_info.yml +++ b/examples/pbr_info.yml @@ -10,7 +10,7 @@ nutanix_username: nutanix_password: validate_certs: false - + tasks: - name: List pbrs using length and offset @@ -19,7 +19,7 @@ offset: 0 register: result ignore_errors: True - + - name: List pbrs using ascending priority sorting ntnx_pbrs_info: sort_order: "ASCENDING" diff --git a/examples/permissions_info.yml b/examples/permissions_info.yml index a8d923920..8b8bc3960 100644 --- a/examples/permissions_info.yml +++ b/examples/permissions_info.yml @@ -29,4 +29,4 @@ - name: output debug: - msg: "{{ op3 }}" \ No newline at end of file + msg: "{{ op3 }}" diff --git a/examples/projects_crud.yml b/examples/projects_crud.yml index 95c9c4d43..ff785196a 100644 --- a/examples/projects_crud.yml +++ b/examples/projects_crud.yml @@ -14,7 +14,7 @@ ntnx_projects: name: "test-ansible-project-1" desc: "desc-123" - subnets: + subnets: - name: "s1" default_subnet: name: "s1" @@ -30,7 +30,7 @@ accounts: - name: register: project1 - + - name: update project ntnx_projects: state: present @@ -43,12 +43,12 @@ - resource_type: MEMORY limit: 4096000 register: updated_project - + - name: Read the updated project ntnx_projects_info: project_uuid: "{{updated_project.project_uuid}}" register: project_info - + - name: Print the project details debug: msg: "{{project_info}}" @@ -58,5 +58,3 @@ state: absent project_uuid: "{{updated_project.project_uuid}}" register: op - - \ No newline at end of file diff --git a/examples/projects_with_role_mapping.yml b/examples/projects_with_role_mapping.yml index 94d8f955e..c66fb47d5 100644 --- a/examples/projects_with_role_mapping.yml +++ b/examples/projects_with_role_mapping.yml @@ -16,7 +16,7 @@ desc: "desc-123" clusters: - - subnets: + subnets: - name: "s1" - name: "overlay-s2" default_subnet: @@ -56,7 +56,7 @@ role: name: "Consumer" register: project1 - + - name: update role mappings of project ntnx_projects: state: present @@ -74,13 +74,13 @@ role: name: "all-permissions" register: updated_project - + - name: Read the updated project ntnx_projects_info: project_uuid: "{{updated_project.project_uuid}}" include_acps: true register: project_info - + - name: Print the project details debug: msg: "{{project_info}}" @@ -90,5 +90,3 @@ state: absent project_uuid: "{{updated_project.project_uuid}}" register: op - - \ No newline at end of file diff --git a/examples/roles_crud.yml b/examples/roles_crud.yml index 41e863045..b01c02eca 100644 --- a/examples/roles_crud.yml +++ b/examples/roles_crud.yml @@ -13,18 +13,18 @@ - name: get some permissions for adding in roles ntnx_permissions_info: register: permissions - + - name: Create a role with 2 permissions. Here we will be using name or uuid for referenceing permissions ntnx_roles: state: present name: test-ansible-role-1 - desc: + desc: permissions: - name: "{{ permissions.response.entities[0].status.name }}" - uuid: "{{ permissions.response.entities[1].metadata.uuid }}" wait: true register: role1 - + - name: Update role ntnx_roles: state: present @@ -34,19 +34,19 @@ - name: "{{ permissions.response.entities[2].status.name }}" wait: true register: updated_role1 - + - name: Read the updated role ntnx_roles_info: role_uuid: "{{ updated_role1.role_uuid }}" register: role1_info - + - name: Print the role details debug: msg: "{{role1_info}}" - - name: Delete the role. + - name: Delete the role. ntnx_roles: state: absent role_uuid: "{{ updated_role1.role_uuid }}" wait: true - register: op \ No newline at end of file + register: op diff --git a/examples/static_routes.yml b/examples/static_routes.yml index 8c64354f2..846168e3a 100644 --- a/examples/static_routes.yml +++ b/examples/static_routes.yml @@ -43,4 +43,4 @@ - name: remove all routes excluding dynamic and local routes ntnx_static_routes: vpc_uuid: "{{ vpc_uuid }}" - remove_all_routes: true \ No newline at end of file + remove_all_routes: true diff --git a/examples/subnet.yml b/examples/subnet.yml index 5b3cd02fe..c77be095a 100644 --- a/examples/subnet.yml +++ b/examples/subnet.yml @@ -17,7 +17,7 @@ virtual_switch_name: "" virtual_switch_uuid: "" network_ip: "" - network_prefix: + network_prefix: gateway_ip_address: "" start_address: "" end_address: "" @@ -29,7 +29,7 @@ dhcp_server_address: "" vpc_name: "" vpc_uuid: "" - + - name: 'VLAN subnet with IPAM, IP pools and DHCP' ntnx_subnets: state: present @@ -56,7 +56,7 @@ dhcp_server_ip: '{{ dhcp_server_address }}' register: result ignore_errors: true - + - name: External subnet with NAT ntnx_subnets: state: present @@ -75,7 +75,7 @@ end_ip: '{{ end_address }}' register: result ignore_errors: true - + - name: Overlay Subnet with IP_pools and DHCP ntnx_subnets: state: present diff --git a/examples/subnet_info.yml b/examples/subnet_info.yml index 1d9d93314..ce5bb045d 100644 --- a/examples/subnet_info.yml +++ b/examples/subnet_info.yml @@ -11,7 +11,7 @@ nutanix_password: validate_certs: false - tasks: + tasks: - name: List subnets using subnet_type filter criteria ntnx_subnets_info: filter: @@ -19,7 +19,7 @@ kind: subnet register: result ignore_errors: True - + - name: List subnets using length, offset and vlan_id ascending sorting ntnx_subnets_info: length: 1 diff --git a/examples/user-groups.yml b/examples/user-groups.yml index cd9abd3f9..9dcc96e91 100644 --- a/examples/user-groups.yml +++ b/examples/user-groups.yml @@ -19,7 +19,7 @@ identity_provider_uuid: "" project: uuid: "" - + - name: create user group ntnx_user_groups: distinguished_name: "{{distinguished_name}}" diff --git a/examples/user.yml b/examples/user.yml index 8d515b53f..e70b61b14 100644 --- a/examples/user.yml +++ b/examples/user.yml @@ -30,11 +30,11 @@ state: absent user_uuid: "{{ result.user_uuid }}" - - name: create local user with project and categories + - name: create local user with project and categories ntnx_users: principal_name: "{{principal_name}}" directory_service_uuid: "{{directory_service_uuid}}" - project: + project: uuid: "{{project.uuid}}" categories: Environment: diff --git a/examples/vm_info.yml b/examples/vm_info.yml index 02e362489..309102064 100644 --- a/examples/vm_info.yml +++ b/examples/vm_info.yml @@ -14,10 +14,10 @@ - name: Setting Variables set_fact: vm_name: "" - + - name: List vms using name filter criteria ntnx_vms_info: - filter: + filter: vm_name: "{{ vm_name }}" kind: vm register: result @@ -29,7 +29,7 @@ register: result ignore_errors: True - - name: List vms using length, offset and ascending vm_name sorting + - name: List vms using length, offset and ascending vm_name sorting ntnx_vms_info: length: 10 offset: 1 diff --git a/examples/vm_operations.yml b/examples/vm_operations.yml index 50a977bae..c6bef4dbc 100644 --- a/examples/vm_operations.yml +++ b/examples/vm_operations.yml @@ -17,14 +17,14 @@ script_path: "" subnet_name: "" vm_uuid: "" - + - name: hard power off the vm ntnx_vms: state: hard_poweroff vm_uuid: "{{ vm_uuid }}" register: result ignore_errors: true - + - name: create_ova_image while vm is on ntnx_vms_ova: state: present diff --git a/examples/vm_update.yml b/examples/vm_update.yml index 58d865a23..45de3d642 100644 --- a/examples/vm_update.yml +++ b/examples/vm_update.yml @@ -36,7 +36,7 @@ - Apache_Spark disks: - type: "DISK" - clone_image: + clone_image: name: "{{ image_name }}" bus: "SCSI" size_gb: 20 diff --git a/examples/vpc.yml b/examples/vpc.yml index d6b40488e..3af08fa53 100644 --- a/examples/vpc.yml +++ b/examples/vpc.yml @@ -29,4 +29,4 @@ ntnx_vpcs: state: absent vpc_uuid: "{{ result.vpc_uuid }}" - register: result \ No newline at end of file + register: result diff --git a/examples/vpc_info.yml b/examples/vpc_info.yml index b30a54f90..652d157fd 100644 --- a/examples/vpc_info.yml +++ b/examples/vpc_info.yml @@ -14,7 +14,7 @@ - name: Setting Variables set_fact: vpc_name: "" - + - name: List VPC using name filter criteria ntnx_vpcs_info: filter: @@ -23,7 +23,7 @@ register: result ignore_errors: True - + - name: List VPC using length, offset and descending name sorting ntnx_vpcs_info: length: 4 diff --git a/tests/integration/targets/ntnx_acps/tasks/create_acps.yml b/tests/integration/targets/ntnx_acps/tasks/create_acps.yml index 6b22c74c0..06125d5b6 100644 --- a/tests/integration/targets/ntnx_acps/tasks/create_acps.yml +++ b/tests/integration/targets/ntnx_acps/tasks/create_acps.yml @@ -196,4 +196,4 @@ success_msg: "All acp's deleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_acps/tasks/delete_acp.yml b/tests/integration/targets/ntnx_acps/tasks/delete_acp.yml index 5cbab58cf..f988ef708 100644 --- a/tests/integration/targets/ntnx_acps/tasks/delete_acp.yml +++ b/tests/integration/targets/ntnx_acps/tasks/delete_acp.yml @@ -18,14 +18,14 @@ - "{{ acp.user_group_uuid }}" filters: - scope_filter: - - + - lhs: PROJECT operator: IN rhs: uuid_list: - "{{ project.uuid }}" entity_filter: - - + - lhs: ALL operator: IN rhs: diff --git a/tests/integration/targets/ntnx_acps/tasks/negative_scenarios.yml b/tests/integration/targets/ntnx_acps/tasks/negative_scenarios.yml index 10312fc1e..9f05fbe40 100644 --- a/tests/integration/targets/ntnx_acps/tasks/negative_scenarios.yml +++ b/tests/integration/targets/ntnx_acps/tasks/negative_scenarios.yml @@ -1,6 +1,6 @@ - debug: msg: "Started Negative Creation Cases" - + - name: Unknown role name ntnx_acps: state: present @@ -58,4 +58,4 @@ that: - result.failed==True success_msg: ' Success: returned error as expected ' - fail_msg: ' Fail deleting acp with missing uuid ' \ No newline at end of file + fail_msg: ' Fail deleting acp with missing uuid ' diff --git a/tests/integration/targets/ntnx_acps/tasks/update_acps.yml b/tests/integration/targets/ntnx_acps/tasks/update_acps.yml index d8678eaa4..a2181099e 100644 --- a/tests/integration/targets/ntnx_acps/tasks/update_acps.yml +++ b/tests/integration/targets/ntnx_acps/tasks/update_acps.yml @@ -14,7 +14,7 @@ register: setup_acp - name: Creation Status - assert: + assert: that: - setup_acp.response is defined - setup_acp.response.status.state == 'COMPLETE' @@ -38,7 +38,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -56,14 +56,14 @@ desc: "description after update" filters: - scope_filter: - - + - lhs: PROJECT operator: IN rhs: uuid_list: - "{{ project.uuid }}" entity_filter: - - + - lhs: ALL operator: IN rhs: @@ -71,7 +71,7 @@ register: result - name: Update Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' @@ -97,14 +97,14 @@ desc: "description after update" filters: - scope_filter: - - + - lhs: PROJECT operator: IN rhs: uuid_list: - "{{ project.uuid }}" entity_filter: - - + - lhs: ALL operator: IN rhs: @@ -112,7 +112,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -142,4 +142,4 @@ success_msg: "All acp's deleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_acps_info/meta/main.yml b/tests/integration/targets/ntnx_acps_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_acps_info/meta/main.yml +++ b/tests/integration/targets/ntnx_acps_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_address_groups/meta/main.yml b/tests/integration/targets/ntnx_address_groups/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_address_groups/meta/main.yml +++ b/tests/integration/targets/ntnx_address_groups/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_address_groups/tasks/create.yml b/tests/integration/targets/ntnx_address_groups/tasks/create.yml index 7db393525..59a2e0cef 100644 --- a/tests/integration/targets/ntnx_address_groups/tasks/create.yml +++ b/tests/integration/targets/ntnx_address_groups/tasks/create.yml @@ -2,7 +2,7 @@ - debug: msg: start ntnx_address_groups create tests -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -27,7 +27,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.address_group_uuid is defined @@ -58,7 +58,7 @@ ignore_errors: True - name: Creation Status - assert: + assert: that: - result.msg == "Address group with given name already exists" - result.changed == False @@ -81,7 +81,7 @@ register: result - name: Check mode Status - assert: + assert: that: - result.response is defined - result.changed == False @@ -106,4 +106,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_address_groups/tasks/delete.yml b/tests/integration/targets/ntnx_address_groups/tasks/delete.yml index 7449a209a..1c707f087 100644 --- a/tests/integration/targets/ntnx_address_groups/tasks/delete.yml +++ b/tests/integration/targets/ntnx_address_groups/tasks/delete.yml @@ -2,7 +2,7 @@ - debug: msg: start ntnx_address_groups delete tests -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -24,7 +24,7 @@ register: test_ag - name: Creation Status - assert: + assert: that: - test_ag.response is defined - test_ag.changed == True @@ -40,10 +40,10 @@ register: result - name: delete Status - assert: + assert: that: - result.response is defined - result.changed == True fail_msg: "address group delete failed" - success_msg: "address group deleted successfully" \ No newline at end of file + success_msg: "address group deleted successfully" diff --git a/tests/integration/targets/ntnx_address_groups/tasks/update.yml b/tests/integration/targets/ntnx_address_groups/tasks/update.yml index 5079bc1a1..f4ebedc50 100644 --- a/tests/integration/targets/ntnx_address_groups/tasks/update.yml +++ b/tests/integration/targets/ntnx_address_groups/tasks/update.yml @@ -3,7 +3,7 @@ msg: start ntnx_address_groups update tests -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -17,7 +17,7 @@ ############################################################################################## -- name: Create address group with +- name: Create address group with ntnx_address_groups: state: present name: "{{ag1}}" @@ -30,7 +30,7 @@ register: test_ag - name: Creation Status - assert: + assert: that: - test_ag.response is defined - test_ag.changed == True @@ -52,7 +52,7 @@ register: result - name: Update status - assert: + assert: that: - result.response is defined - result.address_group_uuid is defined @@ -80,7 +80,7 @@ register: result - name: idempotency check status - assert: + assert: that: - result.changed == False - result.failed == False @@ -106,7 +106,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.address_group_uuid is defined diff --git a/tests/integration/targets/ntnx_address_groups_info/tasks/address_groups_info.yml b/tests/integration/targets/ntnx_address_groups_info/tasks/address_groups_info.yml index ff4963b62..bebdf2535 100644 --- a/tests/integration/targets/ntnx_address_groups_info/tasks/address_groups_info.yml +++ b/tests/integration/targets/ntnx_address_groups_info/tasks/address_groups_info.yml @@ -8,7 +8,7 @@ - network_ip: "10.0.2.0" network_prefix: 24 register: ag_1 - + - name: Create address groups for tests ntnx_address_groups: name: test-address-groups-info-2 @@ -19,7 +19,7 @@ ################################################## -- name: List all address groups +- name: List all address groups ntnx_address_groups_info: register: result ignore_errors: True @@ -38,7 +38,7 @@ - set_fact: test_address_groups_uuid: "{{result.response.entities.1.uuid}}" -################################################## +################################################## - name: List address groups using uuid criteria ntnx_address_groups_info: @@ -56,11 +56,11 @@ fail_msg: "Unable to list address groups using uuid" success_msg: "add groups info obtained successfully" -################################################## +################################################## - name: List address groups using filter criteria ntnx_address_groups_info: - filter: + filter: name: "{{ test_address_groups_name }}" register: result ignore_errors: True @@ -77,7 +77,7 @@ fail_msg: "Unable to list address groups using filter" success_msg: "address groups info obtained successfully" -################################################## +################################################## - name: List address groups using length and offset ntnx_address_groups_info: diff --git a/tests/integration/targets/ntnx_categories/meta/main.yml b/tests/integration/targets/ntnx_categories/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_categories/meta/main.yml +++ b/tests/integration/targets/ntnx_categories/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_categories/tasks/all_operations.yml b/tests/integration/targets/ntnx_categories/tasks/all_operations.yml index 655505426..679532a42 100644 --- a/tests/integration/targets/ntnx_categories/tasks/all_operations.yml +++ b/tests/integration/targets/ntnx_categories/tasks/all_operations.yml @@ -23,7 +23,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -47,7 +47,7 @@ - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -71,14 +71,14 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == false - result.msg == "Nothing to update." fail_msg: "Fail: existing category update with wrong values" success_msg: "Passed: Nothing to update as expected " - ################# + ################# - name: update existing category by deleting some values ntnx_categories: state: "absent" @@ -89,14 +89,14 @@ register: result ignore_errors: true -- name: get modified category +- name: get modified category ntnx_categories_info: name: "{{first_category.name}}" register: result ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == false @@ -114,7 +114,7 @@ register: result ignore_errors: true -- name: get modified category +- name: get modified category ntnx_categories_info: name: "{{first_category.name}}" register: result @@ -122,7 +122,7 @@ - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == false @@ -131,21 +131,21 @@ fail_msg: "Fail: unable to update existing category by deleting all values " success_msg: "Passed: update existing category by deleting all values finished successfully" ################# -- name: Delte the category +- name: Delte the category ntnx_categories: state: "absent" name: "{{first_category.name}}" register: result ignore_errors: true -- name: search deleted category +- name: search deleted category ntnx_categories_info: name: "{{first_category.name}}" register: result ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == false @@ -167,7 +167,7 @@ check_mode: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -191,7 +191,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -202,7 +202,7 @@ fail_msg: "Unable to Create category key and value together" success_msg: "Create category key and value together finished successfully" ################# -- name: delete the category +- name: delete the category ntnx_categories: state: "absent" name: "{{second_category.name}}" @@ -210,10 +210,10 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true - result.failed == false fail_msg: "Fail: Unable to delete the category" - success_msg: "Pass : category has been deleted successfully" \ No newline at end of file + success_msg: "Pass : category has been deleted successfully" diff --git a/tests/integration/targets/ntnx_categories/tasks/main.yml b/tests/integration/targets/ntnx_categories/tasks/main.yml index 993f405e8..d4d19ea74 100644 --- a/tests/integration/targets/ntnx_categories/tasks/main.yml +++ b/tests/integration/targets/ntnx_categories/tasks/main.yml @@ -6,4 +6,4 @@ nutanix_password: "{{ password }}" validate_certs: "{{ validate_certs }}" block: - - import_tasks: "all_operations.yml" \ No newline at end of file + - import_tasks: "all_operations.yml" diff --git a/tests/integration/targets/ntnx_categories_info/meta/main.yml b/tests/integration/targets/ntnx_categories_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_categories_info/meta/main.yml +++ b/tests/integration/targets/ntnx_categories_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_categories_info/tasks/info.yml b/tests/integration/targets/ntnx_categories_info/tasks/info.yml index 3326e548d..69a1eff99 100644 --- a/tests/integration/targets/ntnx_categories_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_categories_info/tasks/info.yml @@ -25,7 +25,7 @@ - 'value-b' - 'value-c' -- name: Create category key +- name: Create category key ntnx_categories: state: "present" name: "{{category_name}}" @@ -66,7 +66,7 @@ fail_msg: "Unable to get particular category with it's name" success_msg: "category info obtained successfully by it's name" ##################################################################################################### -- name: delete the category +- name: delete the category ntnx_categories: state: "absent" name: "{{category_name}}" @@ -74,10 +74,10 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true - result.failed == false fail_msg: "Fail: Unable to delete the category" - success_msg: "Pass : category has been deleted successfully" \ No newline at end of file + success_msg: "Pass : category has been deleted successfully" diff --git a/tests/integration/targets/ntnx_clusters_info/tasks/get_clusters_info.yml b/tests/integration/targets/ntnx_clusters_info/tasks/get_clusters_info.yml index 61ec52096..4f78278c2 100644 --- a/tests/integration/targets/ntnx_clusters_info/tasks/get_clusters_info.yml +++ b/tests/integration/targets/ntnx_clusters_info/tasks/get_clusters_info.yml @@ -54,4 +54,4 @@ # - result.failed == false # - result.response.entities[0].metadata.uuid is defined # fail_msg: "Unable to list all cluster" -# success_msg: "clusters listed successfully" \ No newline at end of file +# success_msg: "clusters listed successfully" diff --git a/tests/integration/targets/ntnx_foundation/tasks/image_nodes.yml b/tests/integration/targets/ntnx_foundation/tasks/image_nodes.yml index 17800bb61..b27e210df 100644 --- a/tests/integration/targets/ntnx_foundation/tasks/image_nodes.yml +++ b/tests/integration/targets/ntnx_foundation/tasks/image_nodes.yml @@ -44,7 +44,7 @@ hypervisor_hostname: "IBIS2" clusters: - redundancy_factor: 2 - cluster_members: + cluster_members: - "{{IBIS_node.node1.cvm_ip}}" - "{{IBIS_node.node3.cvm_ip}}" - "{{IBIS_node.node2.cvm_ip}}" diff --git a/tests/integration/targets/ntnx_foundation/tasks/negative_scenarios.yml b/tests/integration/targets/ntnx_foundation/tasks/negative_scenarios.yml index dc17d5103..86472bf65 100644 --- a/tests/integration/targets/ntnx_foundation/tasks/negative_scenarios.yml +++ b/tests/integration/targets/ntnx_foundation/tasks/negative_scenarios.yml @@ -1,4 +1,4 @@ - - name: Image nodes with check mode + - name: Image nodes with check mode check_mode: yes ntnx_foundation: timeout: 3660 @@ -24,13 +24,13 @@ node_position: "{{IBIS_node.node1.node_position}}" clusters: - redundancy_factor: 2 - cluster_members: + cluster_members: - "{{IBIS_node.node1.cvm_ip}}" - "{{IBIS_node.node3.cvm_ip}}" - "{{IBIS_node.node2.cvm_ip}}" name: "test-cluster" register: result - + - name: Creation Status assert: that: @@ -74,7 +74,7 @@ hypervisor: "{{IBIS_node.node3.hypervisor}}" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -97,7 +97,7 @@ blocks: - block_id: "{{IBIS_node.block_id}}" nodes: - - discovery_mode: + - discovery_mode: cvm_gb_ram: 50 node_serial: wrong_serial device_hint: "vm_installer" @@ -116,4 +116,4 @@ - result.failed==true - "result.msg=='value of hypervisor must be one of: kvm, hyperv, xen, esx, ahv, got: phoenix found in blocks -> nodes -> discovery_mode -> discovery_override'" fail_msg: " Fail : Image nodes with wrong hypervisor done successfully " - success_msg: "Succes: unable to image node with wrong hypervisor" \ No newline at end of file + success_msg: "Succes: unable to image node with wrong hypervisor" diff --git a/tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/configure_ipmi.yml b/tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/configure_ipmi.yml index e7adecb86..9988683a3 100644 --- a/tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/configure_ipmi.yml +++ b/tests/integration/targets/ntnx_foundation_bmc_ipmi_config/tasks/configure_ipmi.yml @@ -24,4 +24,4 @@ - result.response.blocks.0.nodes.0.ipmi_configure_successful==true - result.response.blocks.0.nodes.0.ipmi_message is defined fail_msg: "bmc ipmi configure was failed with error result.error" - success_msg: "bmc ipmi configure was successfull" \ No newline at end of file + success_msg: "bmc ipmi configure was successfull" diff --git a/tests/integration/targets/ntnx_foundation_central/vars/main.yml b/tests/integration/targets/ntnx_foundation_central/vars/main.yml index 8a57d7e0f..34d455f00 100644 --- a/tests/integration/targets/ntnx_foundation_central/vars/main.yml +++ b/tests/integration/targets/ntnx_foundation_central/vars/main.yml @@ -1 +1 @@ -cluster_name: test_cluster \ No newline at end of file +cluster_name: test_cluster diff --git a/tests/integration/targets/ntnx_foundation_central_api_keys/tasks/create_key.yml b/tests/integration/targets/ntnx_foundation_central_api_keys/tasks/create_key.yml index 07fe3a401..92943493e 100644 --- a/tests/integration/targets/ntnx_foundation_central_api_keys/tasks/create_key.yml +++ b/tests/integration/targets/ntnx_foundation_central_api_keys/tasks/create_key.yml @@ -21,7 +21,7 @@ - name: Generate random alias for api key set_fact: random_alias: "{{query('community.general.random_string',numbers=false, special=false,length=12)}}" - + - name: create api key with random alias ntnx_foundation_central_api_keys: diff --git a/tests/integration/targets/ntnx_foundation_central_api_keys_info/tasks/main.yml b/tests/integration/targets/ntnx_foundation_central_api_keys_info/tasks/main.yml index 86f63ce33..7444f4ef7 100644 --- a/tests/integration/targets/ntnx_foundation_central_api_keys_info/tasks/main.yml +++ b/tests/integration/targets/ntnx_foundation_central_api_keys_info/tasks/main.yml @@ -12,4 +12,4 @@ nutanix_password: "{{ password }}" validate_certs: false block: - - import_tasks: "key_info.yml" \ No newline at end of file + - import_tasks: "key_info.yml" diff --git a/tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/tasks/get_cluster_info.yml b/tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/tasks/get_cluster_info.yml index 14c6b4c6a..cb248215e 100644 --- a/tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/tasks/get_cluster_info.yml +++ b/tests/integration/targets/ntnx_foundation_central_imaged_clusters_info/tasks/get_cluster_info.yml @@ -14,7 +14,7 @@ that: - clusters.changed==true - clusters.failed==false - - clusters.response is defined + - clusters.response is defined fail_msg: "fail: unable to get all imaged,archived cluster " success_msg: "succes: get all imaged,archived cluster sucessfuly " @@ -30,14 +30,14 @@ that: - result.changed==true - result.failed==false - - result.response is defined - - result.response.imaged_cluster_uuid == "{{clusters.response.imaged_clusters.0.imaged_cluster_uuid}}" + - result.response is defined + - result.response.imaged_cluster_uuid == "{{clusters.response.imaged_clusters.0.imaged_cluster_uuid}}" fail_msg: "fail: unable to get imaged cluster using image_cluster_uuid " success_msg: "succes: get imaged cluster using image_cluster_uuid sucessfuly " - name: get imaged cluster using custom filter ntnx_foundation_central_imaged_clusters_info: - custom_filter: + custom_filter: destroyed: true register: result ignore_errors: true @@ -47,12 +47,12 @@ that: - result.changed==true - result.failed==false - - result.response.imaged_clusters is defined + - result.response.imaged_clusters is defined fail_msg: "fail: unable to get imaged cluster using custom filter " success_msg: "succes: get imaged cluster using custom filter sucessfully" -# still offset and length +# still offset and length # - debug: # var: clusters.response @@ -64,4 +64,4 @@ # register: result # ignore_errors: true # - debug: -# var: result.response.imaged_clusters|length \ No newline at end of file +# var: result.response.imaged_clusters|length diff --git a/tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/tasks/get_node_info.yml b/tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/tasks/get_node_info.yml index 1ad06894b..7fc30a286 100644 --- a/tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/tasks/get_node_info.yml +++ b/tests/integration/targets/ntnx_foundation_central_imaged_nodes_info/tasks/get_node_info.yml @@ -35,7 +35,7 @@ - name: get imaged node using custom filter ntnx_foundation_central_imaged_nodes_info: - custom_filter: + custom_filter: node_serial: "{{nodes.response.imaged_nodes.0.node_serial}}" register: result ignore_errors: true @@ -44,10 +44,10 @@ assert: that: - result.changed==true - - result.failed==false - - result.response.imaged_nodes.0.imaged_node_uuid == nodes.response.imaged_nodes.0.imaged_node_uuid + - result.failed==false + - result.response.imaged_nodes.0.imaged_node_uuid == nodes.response.imaged_nodes.0.imaged_node_uuid - result.response.metadata.length <=1 fail_msg: "fail: unable to get imaged node using custom filter " success_msg: "succes: get imaged node using custom filter sucessfully" -# still offset and length and filter \ No newline at end of file +# still offset and length and filter diff --git a/tests/integration/targets/ntnx_foundation_discover_nodes_info/tasks/discover_nodes.yml b/tests/integration/targets/ntnx_foundation_discover_nodes_info/tasks/discover_nodes.yml index 4d9771822..973b93d41 100644 --- a/tests/integration/targets/ntnx_foundation_discover_nodes_info/tasks/discover_nodes.yml +++ b/tests/integration/targets/ntnx_foundation_discover_nodes_info/tasks/discover_nodes.yml @@ -16,7 +16,7 @@ - result.blocks.0.nodes.0.ipv6_address is defined fail_msg: " Fail : unable to Discover nodes " success_msg: "Succes: Discover nodes finished successfully " - + - name: Discover all nodes ntnx_foundation_discover_nodes_info: include_configured: true diff --git a/tests/integration/targets/ntnx_hosts_info/tasks/get_hosts_info.yml b/tests/integration/targets/ntnx_hosts_info/tasks/get_hosts_info.yml index 0f4fed984..cb84471e2 100644 --- a/tests/integration/targets/ntnx_hosts_info/tasks/get_hosts_info.yml +++ b/tests/integration/targets/ntnx_hosts_info/tasks/get_hosts_info.yml @@ -52,4 +52,4 @@ - result.changed == false - result.response.entities[0].metadata.uuid is defined fail_msg: "Unable to list all host" - success_msg: "hosts listed successfully" \ No newline at end of file + success_msg: "hosts listed successfully" diff --git a/tests/integration/targets/ntnx_image_placement_policies_info/meta/main.yml b/tests/integration/targets/ntnx_image_placement_policies_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_image_placement_policies_info/meta/main.yml +++ b/tests/integration/targets/ntnx_image_placement_policies_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_image_placement_policies_info/tasks/info.yml b/tests/integration/targets/ntnx_image_placement_policies_info/tasks/info.yml index e7f18c567..8515e38ae 100644 --- a/tests/integration/targets/ntnx_image_placement_policies_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_image_placement_policies_info/tasks/info.yml @@ -6,7 +6,7 @@ ntnx_image_placement_policy: placement_type: soft name: "test_policy_1" - image_categories: + image_categories: AnalyticsExclusions: - AnomalyDetection cluster_categories: @@ -18,7 +18,7 @@ ntnx_image_placement_policy: placement_type: soft name: "test_policy_2" - image_categories: + image_categories: AnalyticsExclusions: - AnomalyDetection cluster_categories: @@ -36,7 +36,7 @@ - name: test getting all image placement policies ntnx_image_placement_policies_info: register: result - + - name: check listing status assert: that: @@ -54,7 +54,7 @@ length: 1 offset: 0 register: result - + - name: check listing status assert: that: @@ -69,7 +69,7 @@ ntnx_image_placement_policies_info: policy_uuid: "{{ policy_2.response.metadata.uuid }}" register: result - + - name: check listing status assert: that: @@ -104,4 +104,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_image_placement_policy/meta/main.yml b/tests/integration/targets/ntnx_image_placement_policy/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/meta/main.yml +++ b/tests/integration/targets/ntnx_image_placement_policy/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_image_placement_policy/tasks/create.yml b/tests/integration/targets/ntnx_image_placement_policy/tasks/create.yml index 5c18acc65..5489af62e 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/tasks/create.yml +++ b/tests/integration/targets/ntnx_image_placement_policy/tasks/create.yml @@ -6,7 +6,7 @@ ntnx_image_placement_policy: name: "test_policy_1" placement_type: soft - image_categories: + image_categories: AnalyticsExclusions: - AnomalyDetection cluster_categories: @@ -15,7 +15,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -42,7 +42,7 @@ - "Dev" AppType: - "Default" - image_categories: + image_categories: AnalyticsExclusions: - EfficiencyMeasurement - AnomalyDetection @@ -52,7 +52,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' @@ -72,7 +72,7 @@ name: "test_policy_3" desc: "test_policy_3_desc" placement_type: hard - image_categories: + image_categories: AnalyticsExclusions: - EfficiencyMeasurement - AnomalyDetection @@ -82,7 +82,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -95,7 +95,7 @@ - name: Create image placement policy with incorrect category ntnx_image_placement_policy: name: "test_policy_4" - image_categories: + image_categories: Wrong: - Category cluster_categories: @@ -105,7 +105,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -124,4 +124,4 @@ ignore_errors: true - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_image_placement_policy/tasks/delete.yml b/tests/integration/targets/ntnx_image_placement_policy/tasks/delete.yml index 871de54e2..2d39baf74 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/tasks/delete.yml +++ b/tests/integration/targets/ntnx_image_placement_policy/tasks/delete.yml @@ -6,7 +6,7 @@ ntnx_image_placement_policy: name: "test_policy_5" placement_type: soft - image_categories: + image_categories: AnalyticsExclusions: - AnomalyDetection cluster_categories: @@ -15,7 +15,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -37,9 +37,9 @@ - result.failed == false fail_msg: "Unable to delete image placement policy" success_msg: "Image placement policy deleted successfully" - + ##################################################################################################### - + - name: Delete image placement policy with incorrect uuid ntnx_image_placement_policy: state: absent @@ -54,4 +54,4 @@ - result.changed == false - result.failed == true fail_msg: "delete of image placement policy with incorrect uuid didn't failed" - success_msg: "Image placement policy delete with incorrect uuid failed successfully" \ No newline at end of file + success_msg: "Image placement policy delete with incorrect uuid failed successfully" diff --git a/tests/integration/targets/ntnx_image_placement_policy/tasks/main.yml b/tests/integration/targets/ntnx_image_placement_policy/tasks/main.yml index b5e00ad70..a2c7a07b0 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/tasks/main.yml +++ b/tests/integration/targets/ntnx_image_placement_policy/tasks/main.yml @@ -8,4 +8,4 @@ block: - import_tasks: "create.yml" - import_tasks: "update.yml" - - import_tasks: "delete.yml" \ No newline at end of file + - import_tasks: "delete.yml" diff --git a/tests/integration/targets/ntnx_image_placement_policy/tasks/update.yml b/tests/integration/targets/ntnx_image_placement_policy/tasks/update.yml index 4bf0a4488..3f0087324 100644 --- a/tests/integration/targets/ntnx_image_placement_policy/tasks/update.yml +++ b/tests/integration/targets/ntnx_image_placement_policy/tasks/update.yml @@ -6,7 +6,7 @@ ntnx_image_placement_policy: name: "test_policy_6" placement_type: soft - image_categories: + image_categories: AnalyticsExclusions: - EfficiencyMeasurement cluster_categories: @@ -20,14 +20,14 @@ register: setup_policy - name: Creation Status - assert: + assert: that: - setup_policy.response is defined - setup_policy.changed == true - setup_policy.response.status.state == 'COMPLETE' fail_msg: "Unable to create image placement policy with minimal spec" success_msg: "Image placement policy with minimal spec created successfully" - + - set_fact: todelete: '{{ todelete + [ setup_policy["response"]["metadata"]["uuid"] ] }}' @@ -38,7 +38,7 @@ state: present policy_uuid: "{{ setup_policy.response.metadata.uuid }}" placement_type: "soft" - image_categories: + image_categories: AnalyticsExclusions: - EfficiencyMeasurement cluster_categories: @@ -58,7 +58,7 @@ - "'Nothing to change' in result.msg" fail_msg: "Image placement policy got updated" success_msg: "Image placement policy update skipped successfully due to no changes in spec" - + ##################################################################################################### - name: update all specs @@ -68,7 +68,7 @@ placement_type: "hard" name: "test_policy_6_updated" desc: "test_policy_6_desc_updated" - image_categories: + image_categories: AppTier: - Default cluster_categories: @@ -82,7 +82,7 @@ register: result - name: Update Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -107,7 +107,7 @@ register: result - name: Update Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -127,4 +127,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_images/meta/main.yml b/tests/integration/targets/ntnx_images/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_images/meta/main.yml +++ b/tests/integration/targets/ntnx_images/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_images/tasks/create.yml b/tests/integration/targets/ntnx_images/tasks/create.yml index 0195ebc82..207f1bd8b 100644 --- a/tests/integration/targets/ntnx_images/tasks/create.yml +++ b/tests/integration/targets/ntnx_images/tasks/create.yml @@ -12,7 +12,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' @@ -51,14 +51,14 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' - result.response.status.resources.image_type == "DISK_IMAGE" - result.response.metadata.categories_mapping['AppType'] == ['Default'] - result.response.metadata.categories_mapping['Environment'] == ['Dev'] - - result.response.status.resources.initial_placement_ref_list[0]['uuid'] == "{{ cluster.uuid }}" + - result.response.status.resources.initial_placement_ref_list[0]['uuid'] == "{{ cluster.uuid }}" - result.response.status.resources.checksum.checksum_value == "{{ disk_image.checksum }}" - result.response.status.resources.version.product_name == "test" - result.response.status.resources.version.product_version == "1.2.0" @@ -87,7 +87,7 @@ product_name: "test" product_version: "1.2.0" clusters: - - name: "{{ cluster.name }}" + - name: "{{ cluster.name }}" checksum: checksum_algorithm: "SHA_1" checksum_value: "{{ disk_image.checksum }}" @@ -144,4 +144,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_images/tasks/delete.yml b/tests/integration/targets/ntnx_images/tasks/delete.yml index 0f9d360be..3c91138e4 100644 --- a/tests/integration/targets/ntnx_images/tasks/delete.yml +++ b/tests/integration/targets/ntnx_images/tasks/delete.yml @@ -12,7 +12,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == true @@ -34,7 +34,7 @@ - result.failed == false fail_msg: "Unable to delete image" success_msg: "Image deleted successfully" - + ##################################################################################################### - name: "Negative scenario when delete image with incorrect uuid" @@ -43,11 +43,11 @@ image_uuid: abcd register: result ignore_errors: True - + - name: Creation Status assert: that: - result.response is defined - result.failed == True success_msg: "Success: delete failed as expected" - fail_msg: "Fail: Delete vm didn't returned error for incorrect uuid" \ No newline at end of file + fail_msg: "Fail: Delete vm didn't returned error for incorrect uuid" diff --git a/tests/integration/targets/ntnx_images/tasks/main.yml b/tests/integration/targets/ntnx_images/tasks/main.yml index b5e00ad70..a2c7a07b0 100644 --- a/tests/integration/targets/ntnx_images/tasks/main.yml +++ b/tests/integration/targets/ntnx_images/tasks/main.yml @@ -8,4 +8,4 @@ block: - import_tasks: "create.yml" - import_tasks: "update.yml" - - import_tasks: "delete.yml" \ No newline at end of file + - import_tasks: "delete.yml" diff --git a/tests/integration/targets/ntnx_images/tasks/update.yml b/tests/integration/targets/ntnx_images/tasks/update.yml index 0cd1a4812..b87d7501c 100644 --- a/tests/integration/targets/ntnx_images/tasks/update.yml +++ b/tests/integration/targets/ntnx_images/tasks/update.yml @@ -18,7 +18,7 @@ product_name: "test" product_version: "1.2.0" clusters: - - name: "{{ cluster.name }}" + - name: "{{ cluster.name }}" checksum: checksum_algorithm: "SHA_1" checksum_value: "{{ disk_image.checksum }}" @@ -27,7 +27,7 @@ register: setup_image - name: Creation Status - assert: + assert: that: - setup_image.response is defined - setup_image.response.status.state == 'COMPLETE' @@ -40,7 +40,7 @@ ############################################# UPDATE TESTS ######################################## - name: check idempotency - ntnx_images: + ntnx_images: state: present image_uuid: "{{ setup_image.image_uuid }}" name: integration-test-image-update @@ -54,7 +54,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -65,7 +65,7 @@ ######################################################################################## - name: Update name, desc and categories - ntnx_images: + ntnx_images: state: present image_uuid: "{{ setup_image.image_uuid }}" name: integration-test-image-after-update @@ -79,7 +79,7 @@ register: result - name: Update Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' @@ -94,15 +94,15 @@ ######################################################################################## - name: test removal of all categories from image - ntnx_images: + ntnx_images: state: present image_uuid: "{{ setup_image.image_uuid }}" remove_categories: true register: result - + - name: Update Status - assert: + assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' @@ -121,4 +121,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_images_info/meta/main.yml b/tests/integration/targets/ntnx_images_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_images_info/meta/main.yml +++ b/tests/integration/targets/ntnx_images_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_images_info/tasks/info.yml b/tests/integration/targets/ntnx_images_info/tasks/info.yml index aa21addcc..382319a75 100644 --- a/tests/integration/targets/ntnx_images_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_images_info/tasks/info.yml @@ -5,7 +5,7 @@ - name: test getting all images ntnx_images_info: register: result - + - name: check listing status assert: that: @@ -19,7 +19,7 @@ filter: name: "{{ disk_image.centos }}" register: result - + - name: check listing status assert: that: @@ -40,11 +40,11 @@ ntnx_images_info: image_uuid: '{{ result.response.entities[0].metadata.uuid }}' register: result - + - name: check listing status assert: that: - result.response is defined - result.response.status.name == '{{ disk_image.centos }}' fail_msg: "Unable to get particular image" - success_msg: "Image info obtained successfully" \ No newline at end of file + success_msg: "Image info obtained successfully" diff --git a/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/crud.yml b/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/crud.yml index 7902da501..bfbc770df 100644 --- a/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/crud.yml +++ b/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/crud.yml @@ -6,7 +6,7 @@ karbon_name: "test-module21" ############################# -- name: Verify check mode for PROD karbon cluster +- name: Verify check mode for PROD karbon cluster ntnx_karbon_clusters: cluster: uuid: "{{cluster.uuid}}" @@ -63,7 +63,7 @@ - result.response.cni_config.service_ipv4_cidr == "{{cni.service_ipv4_cidr}}" success_msg: "Success: check mode spec returned as expected" fail_msg: "Check mode for PROD cluster failed" -############################# +############################# - name: Verify check mode for ntnx_karbon_clusters ntnx_karbon_clusters: @@ -105,7 +105,7 @@ - result.response.cni_config.service_ipv4_cidr == "{{cni.service_ipv4_cidr}}" success_msg: "Success: check mode spec returned as expected" fail_msg: "Check mode for ntnx_karbon_clusters failed" -############################ +############################ - name: create DEV cluster with Flannel network provider ntnx_karbon_clusters: cluster: @@ -222,7 +222,7 @@ success_msg: " Pass: create DEV cluster with Calico network provider finished successfully" ############################# -- name: test getting dev cluster using name +- name: test getting dev cluster using name ntnx_karbon_clusters_info: cluster_name: "{{karbon_cluster.response.name}}" register: result @@ -273,7 +273,7 @@ fail_msg: " Fail: Unable to get particular Cluster and it's kube config " success_msg: " Pass: Cluster info obtained successfully with it's kube config " ############################# -- name: Generate random node_pool name +- name: Generate random node_pool name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=9,upper = false)[0]}}" @@ -288,7 +288,7 @@ - debug: msg: Start testing ntnx_karbon_clusters_node_pools -- name: Create node pool with subnet uuid +- name: Create node pool with subnet uuid ntnx_karbon_clusters_node_pools: node_subnet: uuid: "{{network.dhcp.uuid}}" @@ -298,12 +298,12 @@ num_instances: 2 cpu: 4 memory_gb: 8 # for etcd min 8 - disk_gb: 120 + disk_gb: 120 register: result ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == true - result.failed == false @@ -314,7 +314,7 @@ fail_msg: "Fail: Unable to Create node pool " success_msg: "Passed: Create node pool finished successfully " ################################# -- name: try to update node pool config with same values +- name: try to update node pool config with same values ntnx_karbon_clusters_node_pools: node_pool_name: "{{node1_name}}" cluster_name: "{{karbon_name}}" @@ -322,12 +322,12 @@ num_instances: 2 cpu: 4 memory_gb: 8 # for etcd min 8 - disk_gb: 120 + disk_gb: 120 register: result ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == false @@ -335,7 +335,7 @@ fail_msg: "Fail: idempotecy check fail " success_msg: "Passed: Returned as expected " ################################# -- name: try to update node pool config with wrong labels +- name: try to update node pool config with wrong labels ntnx_karbon_clusters_node_pools: node_pool_name: "{{node1_name}}" cluster_name: "{{karbon_name}}" @@ -347,12 +347,12 @@ add_labels: propert.-+]y5: "string" propert5: "string" - property4: "string+-.3-@" + property4: "string+-.3-@" register: result ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == false - result.failed == true @@ -378,7 +378,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == true - result.failed == false @@ -403,7 +403,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == true - result.failed == false @@ -431,7 +431,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == true - result.failed == false @@ -471,7 +471,7 @@ ignore_errors: true - name: Creation Status - assert: + assert: that: - result.changed == true - result.failed == false @@ -516,4 +516,4 @@ - result.response.status == "SUCCEEDED" fail_msg: " Fail: unable to delete dev cluster with Calico network provider" success_msg: " Pass: delete dev cluster with Calico network provider finished successfully" -############################# \ No newline at end of file +############################# diff --git a/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/negative_scenarios.yml b/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/negative_scenarios.yml index bd897a6dd..3cc7c5541 100644 --- a/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/negative_scenarios.yml +++ b/tests/integration/targets/ntnx_karbon_clusters_and_info/tasks/negative_scenarios.yml @@ -177,4 +177,4 @@ - result.msg == "Failed generating create cluster spec" fail_msg: " Fail: cluster creaeted with wrong num_instances for etcd nodes" success_msg: " Pass: Retunred as expected" -############################# \ No newline at end of file +############################# diff --git a/tests/integration/targets/ntnx_karbon_registries/tasks/create.yml b/tests/integration/targets/ntnx_karbon_registries/tasks/create.yml index 292d7cf16..cf88b97bf 100644 --- a/tests/integration/targets/ntnx_karbon_registries/tasks/create.yml +++ b/tests/integration/targets/ntnx_karbon_registries/tasks/create.yml @@ -3,7 +3,7 @@ - debug: msg: "start ntnx_karbon_registries tests" -- name: Generate random registry_name +- name: Generate random registry_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)}}" diff --git a/tests/integration/targets/ntnx_karbon_registries/tasks/negativ_scenarios.yml b/tests/integration/targets/ntnx_karbon_registries/tasks/negativ_scenarios.yml index 5e26f9517..cbe281e4d 100644 --- a/tests/integration/targets/ntnx_karbon_registries/tasks/negativ_scenarios.yml +++ b/tests/integration/targets/ntnx_karbon_registries/tasks/negativ_scenarios.yml @@ -2,7 +2,7 @@ - debug: msg: Start negative test cases for ntnx_karbon_registries -- name: create registry with wrong port number +- name: create registry with wrong port number ntnx_karbon_registries: name: test_regitry url: "{{url}}" @@ -17,4 +17,4 @@ - result.failed == true - result.changed == false fail_msg: "Fail: create registery with wrong port number finished successfully" - success_msg: "Pass: Returned as expected " \ No newline at end of file + success_msg: "Pass: Returned as expected " diff --git a/tests/integration/targets/ntnx_karbon_registries_info/meta/main.yml b/tests/integration/targets/ntnx_karbon_registries_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_karbon_registries_info/meta/main.yml +++ b/tests/integration/targets/ntnx_karbon_registries_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_karbon_registries_info/tasks/info.yml b/tests/integration/targets/ntnx_karbon_registries_info/tasks/info.yml index d8794a017..810e82abb 100644 --- a/tests/integration/targets/ntnx_karbon_registries_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_karbon_registries_info/tasks/info.yml @@ -2,7 +2,7 @@ - debug: msg: "start ntnx_karbon_registries_info tests" -- name: Generate random registry_name +- name: Generate random registry_name set_fact: random_name1: "{{query('community.general.random_string',numbers=false, special=false,length=12)}}" random_name2: "{{query('community.general.random_string',numbers=false, special=false,length=12)}}" @@ -68,4 +68,4 @@ name: "{{registry_name2}}" state: absent register: result - ignore_errors: True \ No newline at end of file + ignore_errors: True diff --git a/tests/integration/targets/ntnx_ndb_availability_databases/readme.md b/tests/integration/targets/ntnx_ndb_availability_databases/readme.md index ae2744681..7c3628759 100644 --- a/tests/integration/targets/ntnx_ndb_availability_databases/readme.md +++ b/tests/integration/targets/ntnx_ndb_availability_databases/readme.md @@ -1,2 +1,2 @@ ### Modules Tested: -1. HA instances using ntnx_ndb_databases \ No newline at end of file +1. HA instances using ntnx_ndb_databases diff --git a/tests/integration/targets/ntnx_ndb_availability_databases/tasks/tests.yml b/tests/integration/targets/ntnx_ndb_availability_databases/tasks/tests.yml index 7d55b64f5..57efb4ece 100644 --- a/tests/integration/targets/ntnx_ndb_availability_databases/tasks/tests.yml +++ b/tests/integration/targets/ntnx_ndb_availability_databases/tasks/tests.yml @@ -26,11 +26,11 @@ db_params_profile: name: "{{postgres_ha_profiles.db_params_profile.name}}" - + db_server_cluster: new_cluster: name: "{{cluster1_name}}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ postgres_ha_profiles.software_profile.name }}" @@ -40,7 +40,7 @@ name: "{{ postgres_ha_profiles.compute_profile.name }}" password: "temp_password" pub_ssh_key: "test_key" - vms: + vms: - name: "{{cluster1_name}}-vm-1" node_type: "database" role: "Primary" @@ -61,8 +61,8 @@ cluster: name: "{{cluster.cluster2.name}}" node_type: "haproxy" - - + + postgres: type: "ha" db_name: testAnsible @@ -318,7 +318,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -336,11 +336,11 @@ db_params_profile: name: "{{postgres_ha_profiles.db_params_profile.name}}" - + db_server_cluster: new_cluster: name: "{{cluster1_name}}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" ips: - cluster: @@ -355,18 +355,18 @@ name: "{{ postgres_ha_profiles.compute_profile.name }}" password: "{{vm_password}}" pub_ssh_key: "{{public_ssh_key}}" - vms: + vms: - name: "{{cluster1_name}}-vm-1" node_type: "database" role: "Primary" ip: "{{cluster_ips.ip1}}" - + - name: "{{cluster1_name}}-vm-2" node_type: "database" role: "Secondary" ip: "{{cluster_ips.ip2}}" - + - name: "{{cluster1_name}}-vm-3" node_type: "database" role: "Secondary" @@ -375,7 +375,7 @@ - name: "{{cluster1_name}}-vm-ha-proxy1" node_type: "haproxy" ip: "{{cluster_ips.ip4}}" - + - name: "{{cluster1_name}}-vm-ha-proxy2" node_type: "haproxy" ip: "{{cluster_ips.ip5}}" @@ -394,7 +394,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -405,7 +405,7 @@ - name: "{{cluster.cluster1.name}}" tags: ansible-databases: "ha-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -422,14 +422,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -439,7 +439,7 @@ - result.response.description == "ansible-created-db-desc" - properties["db_parameter_profile_id"] == postgres_ha_profiles.db_params_profile.uuid - properties["listener_port"] == "5432" - - properties["cluster_ip"] == "['{{cluster_ips.vip}}']" + - properties["cluster_ip"] == "['{{cluster_ips.vip}}']" - result.response.databaseNodes | length == 3 - result.response.databaseNodes[0].status == "READY" - result.response.databaseNodes[1].status == "READY" @@ -455,7 +455,7 @@ - name: unregister db along with delete time machine and db server vms ntnx_ndb_databases: - db_uuid: "{{result.db_uuid}}" + db_uuid: "{{result.db_uuid}}" state: "absent" wait: true delete_time_machine: true @@ -463,7 +463,7 @@ register: result - name: verify status of delete of database along with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -482,11 +482,11 @@ db_params_profile: name: "{{postgres_ha_profiles.db_params_profile.name}}" - + db_server_cluster: new_cluster: name: "{{cluster1_name}}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ postgres_ha_profiles.software_profile.name }}" @@ -496,22 +496,22 @@ name: "{{ postgres_ha_profiles.compute_profile.name }}" password: "{{vm_password}}" pub_ssh_key: "{{public_ssh_key}}" - vms: + vms: - name: "{{cluster1_name}}-vm-1" node_type: "database" role: "Primary" - + - name: "{{cluster1_name}}-vm-2" node_type: "database" role: "Secondary" - + - name: "{{cluster1_name}}-vm-3" cluster: name: "{{cluster.cluster2.name}}" node_type: "database" role: "Secondary" - + postgres: type: "ha" db_name: testAnsible @@ -524,7 +524,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -536,7 +536,7 @@ - uuid: "{{cluster.cluster2.uuid}}" tags: ansible-databases: "ha-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -553,14 +553,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -586,7 +586,7 @@ - name: unregister db along with delete time machine and db server vms ntnx_ndb_databases: - db_uuid: "{{result.db_uuid}}" + db_uuid: "{{result.db_uuid}}" state: "absent" wait: true delete_time_machine: true @@ -594,7 +594,7 @@ register: result - name: verify status of delete of database along with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false diff --git a/tests/integration/targets/ntnx_ndb_clones_info/meta/main.yml b/tests/integration/targets/ntnx_ndb_clones_info/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_clones_info/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_clones_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_clones_info/tasks/info.yml b/tests/integration/targets/ntnx_ndb_clones_info/tasks/info.yml index ad92320a3..61d21e97b 100644 --- a/tests/integration/targets/ntnx_ndb_clones_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_ndb_clones_info/tasks/info.yml @@ -16,7 +16,7 @@ fail_msg: "Unable to list all era clones" success_msg: "era clones listed successfully" ################################################################ -- name: get era clones using it's name +- name: get era clones using it's name ntnx_ndb_clones_info: name: "{{clones.response[0].name}}" register: result @@ -62,4 +62,4 @@ - result.failed == true - result.changed == false fail_msg: "module didn't errored out correctly when incorrect name is given" - success_msg: "module errored out correctly when incorrect name is given" \ No newline at end of file + success_msg: "module errored out correctly when incorrect name is given" diff --git a/tests/integration/targets/ntnx_ndb_clusters/meta/main.yml b/tests/integration/targets/ntnx_ndb_clusters/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_clusters/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_clusters/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_clusters/tasks/CRUD.yml b/tests/integration/targets/ntnx_ndb_clusters/tasks/CRUD.yml index 405e547c7..232112e75 100644 --- a/tests/integration/targets/ntnx_ndb_clusters/tasks/CRUD.yml +++ b/tests/integration/targets/ntnx_ndb_clusters/tasks/CRUD.yml @@ -250,7 +250,7 @@ ################################################################ - name: get ndb cluster with count_entities ntnx_ndb_clusters_info: - filters: + filters: count_entities: true register: result ignore_errors: true @@ -265,7 +265,7 @@ - result.response[0].entityCounts is defined fail_msg: "Unable to get NDB clusters with count_entities " success_msg: "get NDB clusters using with count_entities successfully" -################################################################ +################################################################ - name: get NDB clusters using it's name ntnx_ndb_clusters_info: name: "{{clusters.response[0].name}}" @@ -340,4 +340,4 @@ - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_ndb_database_clones/tasks/clones.yml b/tests/integration/targets/ntnx_ndb_database_clones/tasks/clones.yml index b47fcf6c6..882a78bb5 100644 --- a/tests/integration/targets/ntnx_ndb_database_clones/tasks/clones.yml +++ b/tests/integration/targets/ntnx_ndb_database_clones/tasks/clones.yml @@ -32,13 +32,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}-db" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -47,7 +47,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "{{ public_ssh_key }}" - + postgres: listener_port: "5432" db_name: testAnsible @@ -60,14 +60,14 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 quaterly: JANUARY log_catchup: 30 snapshots_per_day: 2 - + register: result - set_fact: @@ -77,7 +77,7 @@ time_machine_uuid: "{{result.response.timeMachineId}}" - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -97,7 +97,7 @@ register: result - name: snapshot status - assert: + assert: that: - result.response is defined - result.changed == True @@ -121,13 +121,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" network_profile: name: "{{ network_profile.name }}" @@ -139,18 +139,18 @@ db_password: "{{vm_password}}" pre_clone_cmd: "ls" post_clone_cmd: "ls -a" - + time_machine: name: "{{tm1}}" pitr_timestamp: "2023-02-04 07:29:36" timezone: "UTC" - + removal_schedule: days: 2 timezone: "Asia/Calcutta" remind_before_in_days: 1 delete_database: True - + refresh_schedule: days: 2 time: "12:00:00" @@ -232,7 +232,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -248,13 +248,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" network_profile: name: "{{ network_profile.name }}" @@ -264,17 +264,17 @@ postgres: db_password: "{{vm_password}}" - + time_machine: name: "{{tm1}}" snapshot_uuid: "{{snapshot_uuid}}" - + removal_schedule: days: 2 timezone: "Asia/Calcutta" remind_before_in_days: 1 delete_database: True - + refresh_schedule: days: 2 time: "12:00:00" @@ -287,14 +287,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Clone create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -312,7 +312,7 @@ - result.response.lcmConfig.refreshDetails.refreshInDays == 2 - result.response.lcmConfig.refreshDetails.refreshTime == "12:00:00" - properties["db_parameter_profile_id"] == db_params_profile.uuid - - result.response.tags | length == 1 + - result.response.tags | length == 1 - result.response.tags[0].tagName == "{{tags.clones.name}}" - result.response.tags[0].value == "ansible-test-db-clones" - result.response.sourceSnapshotId == snapshot_uuid @@ -334,13 +334,13 @@ uuid: "{{clone_uuid}}" name: "{{clone_db1}}-updated" desc: "ansible-created-clone-updated" - + removal_schedule: timestamp: "2023-02-10 07:29:36" timezone: "Asia/Calcutta" remind_before_in_days: 4 delete_database: false - + refresh_schedule: days: 4 time: "14:00:00" @@ -351,7 +351,7 @@ register: result - name: Clone update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -365,7 +365,7 @@ - result.response.lcmConfig.expiryDetails.deleteDatabase == False - result.response.lcmConfig.refreshDetails.refreshInDays == 4 - result.response.lcmConfig.refreshDetails.refreshTime == "14:00:00" - - result.response.tags | length == 1 + - result.response.tags | length == 1 - result.response.tags[0].tagName == "{{tags.clones.name}}" - result.response.tags[0].value == "ansible-test-db-clones-updated" @@ -377,13 +377,13 @@ uuid: "{{clone_uuid}}" name: "{{clone_db1}}-updated" desc: "ansible-created-clone-updated" - + removal_schedule: timestamp: "2023-02-10 07:29:36" timezone: "Asia/Calcutta" remind_before_in_days: 4 delete_database: false - + refresh_schedule: days: 4 time: "14:00:00" @@ -396,7 +396,7 @@ - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -408,10 +408,10 @@ - name: remove schedules ntnx_ndb_database_clones: uuid: "{{clone_uuid}}" - + removal_schedule: state: "absent" - + refresh_schedule: state: "absent" @@ -420,7 +420,7 @@ - name: Check schedule remove status - assert: + assert: that: - result.response is defined - result.changed == True @@ -443,8 +443,8 @@ register: result -- name: Check refresh db with pitr spec - assert: +- name: Check refresh db with pitr spec + assert: that: - result.response is defined - result.changed == False @@ -463,7 +463,7 @@ - name: Check database refresh status - assert: + assert: that: - result.response is defined - result.changed == True @@ -486,7 +486,7 @@ - name: verify soft remove spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -508,7 +508,7 @@ - name: verify unregistration spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -528,7 +528,7 @@ - name: verify status of db clone delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -550,7 +550,7 @@ - name: verify status of authorization of db server vms - assert: + assert: that: - result.changed == True - result.failed == false @@ -568,9 +568,9 @@ register: result - + - name: verify status of deauthorization of db server vms - assert: + assert: that: - result.changed == True - result.failed == false @@ -589,7 +589,7 @@ - name: verify status of authorization of db server vms - assert: + assert: that: - result.changed == True - result.failed == false @@ -609,24 +609,24 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: use_authorized_server: name: "{{ vm1_name }}" postgres: db_password: "{{vm_password}}" - + time_machine: uuid: "{{time_machine_uuid}}" snapshot_uuid: "{{snapshot_uuid}}" - + removal_schedule: timestamp: "{{timestamp}}" timezone: "Asia/Calcutta" remind_before_in_days: 1 delete_database: True - + refresh_schedule: days: 2 time: "12:00:00" @@ -639,7 +639,7 @@ - name: Clone create status on authorized db server vm - assert: + assert: that: - result.response is defined - result.changed == True @@ -665,7 +665,7 @@ register: result - name: verify status of db clone delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -686,7 +686,7 @@ - name: verify status of authorization of db server vms - assert: + assert: that: - result.changed == True - result.failed == false @@ -701,24 +701,24 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: use_authorized_server: name: "{{ vm1_name }}" postgres: db_password: "{{vm_password}}" - + time_machine: uuid: "{{time_machine_uuid}}" latest_snapshot: True - + removal_schedule: timestamp: "{{timestamp}}" timezone: "Asia/Calcutta" remind_before_in_days: 1 delete_database: True - + refresh_schedule: days: 2 time: "12:00:00" @@ -731,7 +731,7 @@ - name: Clone create status on authorized db server vm - assert: + assert: that: - result.response is defined - result.changed == True @@ -769,7 +769,7 @@ fail_msg: "Unable to list all era clones" success_msg: "era clones listed successfully" ################################################################ -- name: get era clones using it's name +- name: get era clones using it's name ntnx_ndb_clones_info: name: "{{clones.response[0].name}}" register: result @@ -827,7 +827,7 @@ - name: verify status of db clone delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -844,7 +844,7 @@ register: result - name: verify status of delete of db server vm used for clone - assert: + assert: that: - result.changed == True - result.failed == false @@ -862,7 +862,7 @@ register: result - name: verify status of delete of database along with time machine and db server vm delete - assert: + assert: that: - result.changed == True - result.failed == false diff --git a/tests/integration/targets/ntnx_ndb_databases_actions/readme.md b/tests/integration/targets/ntnx_ndb_databases_actions/readme.md index 7e0698e1b..bfd68471c 100644 --- a/tests/integration/targets/ntnx_ndb_databases_actions/readme.md +++ b/tests/integration/targets/ntnx_ndb_databases_actions/readme.md @@ -3,4 +3,4 @@ 2. ntnx_ndb_database_restore 3. ntnx_ndb_database_snapshots 4. ntnx_ndb_database_scale -5. ntnx_ndb_linked_databases \ No newline at end of file +5. ntnx_ndb_linked_databases diff --git a/tests/integration/targets/ntnx_ndb_databases_actions/tasks/all_actions.yml b/tests/integration/targets/ntnx_ndb_databases_actions/tasks/all_actions.yml index c75d79436..7387bff35 100644 --- a/tests/integration/targets/ntnx_ndb_databases_actions/tasks/all_actions.yml +++ b/tests/integration/targets/ntnx_ndb_databases_actions/tasks/all_actions.yml @@ -33,13 +33,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}-db" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -48,7 +48,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "{{ public_ssh_key }}" - + postgres: listener_port: "5432" db_name: testAnsible1 @@ -61,14 +61,14 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 quaterly: JANUARY log_catchup: 30 snapshots_per_day: 2 - + register: result - set_fact: @@ -78,7 +78,7 @@ time_machine_uuid: "{{result.response.timeMachineId}}" - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -130,7 +130,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -148,7 +148,7 @@ - name: snapshot create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -162,7 +162,7 @@ ntnx_ndb_database_snapshots: name: "{{snapshot_name}}2" time_machine_uuid: "{{time_machine_uuid}}" - expiry_days: 4 + expiry_days: 4 register: result @@ -170,7 +170,7 @@ snapshot_uuid: "{{result.snapshot_uuid}}" - name: snapshot create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -184,13 +184,13 @@ - name: rename snapshot - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" name: "{{snapshot_name}}2-updated" register: result - name: check rename status - assert: + assert: that: - result.response is defined - result.changed == True @@ -209,7 +209,7 @@ register: result - name: snapshot expiry update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -222,13 +222,13 @@ - name: remove expiry schedule - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" remove_expiry: true register: result - name: snapshot expiry update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -240,14 +240,14 @@ - name: Add expiry schedule and rename - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" name: "{{snapshot_name}}2" expiry_days: 6 register: result - name: snapshot update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -261,13 +261,13 @@ - name: Idempotency check - ntnx_ndb_database_snapshots: + ntnx_ndb_database_snapshots: snapshot_uuid: "{{snapshot_uuid}}" expiry_days: 6 register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -307,7 +307,7 @@ - name: Check mode status - assert: + assert: that: - result == expected_response fail_msg: "Unable to create log catcup spec" @@ -343,7 +343,7 @@ - name: Check mode status - assert: + assert: that: - result == expected_response fail_msg: "Unable to create log catcup spec" @@ -358,7 +358,7 @@ register: result - name: verify log catchup status - assert: + assert: that: - result.changed == True - result.failed == false @@ -397,7 +397,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create restore using pitr timestamp spec" @@ -432,7 +432,7 @@ - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create restore using latest snapshot spec" @@ -468,7 +468,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create restore using snapshot uuid spec" @@ -482,7 +482,7 @@ register: result - name: restore status - assert: + assert: that: - result.changed == True - result.failed == false @@ -498,7 +498,7 @@ register: result - name: restore status - assert: + assert: that: - result.changed == True - result.failed == false @@ -548,7 +548,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create database scaling spec" @@ -565,7 +565,7 @@ register: result - name: database scaling status - assert: + assert: that: - result.changed == True - result.failed == false @@ -580,7 +580,7 @@ check_mode: yes ntnx_ndb_linked_databases: db_instance_uuid: "{{db_uuid}}" - databases: + databases: - test1 - test2 - test3 @@ -608,7 +608,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create spec for adding databases in database instance" @@ -618,7 +618,7 @@ - name: add databases in database instance ntnx_ndb_linked_databases: db_instance_uuid: "{{db_uuid}}" - databases: + databases: - test1 - test2 register: result @@ -626,15 +626,15 @@ # {% raw %} - name: create linked databases to its uuid map - set_fact: + set_fact: linked_databases: "{{ linked_databases | default({}) | combine ({ item['name'] : item['id'] }) }}" - loop: "{{result.response}}" + loop: "{{result.response}}" no_log: true # {% endraw %} - name: check linked database update status - assert: + assert: that: - result.changed == true - result.db_instance_uuid is defined @@ -648,21 +648,21 @@ ntnx_ndb_linked_databases: state: "absent" db_instance_uuid: "{{db_uuid}}" - database_uuid: "{{linked_databases.test1}}" + database_uuid: "{{linked_databases.test1}}" register: result # {% raw %} -- name: create linked database map - set_fact: +- name: create linked database map + set_fact: linked_databases: "{{ linked_databases | default({}) | combine ({ item['name'] : item['id'] }) }}" - loop: "{{result.response}}" + loop: "{{result.response}}" no_log: true # {% endraw %} - name: check linked database update status - assert: + assert: that: - result.changed == true - result.db_instance_uuid is defined @@ -683,7 +683,7 @@ register: result - name: verify status of delete of database along with time machine and db server vm delete - assert: + assert: that: - result.changed == True - result.failed == false diff --git a/tests/integration/targets/ntnx_ndb_databases_single_instance_1/readme.md b/tests/integration/targets/ntnx_ndb_databases_single_instance_1/readme.md index 5b9468ff1..95be7ebca 100644 --- a/tests/integration/targets/ntnx_ndb_databases_single_instance_1/readme.md +++ b/tests/integration/targets/ntnx_ndb_databases_single_instance_1/readme.md @@ -1,3 +1,3 @@ ### Modules Tested: 1. ntnx_ndb_databases -2. ntns_ndb_register_database \ No newline at end of file +2. ntns_ndb_register_database diff --git a/tests/integration/targets/ntnx_ndb_databases_single_instance_1/tasks/tests.yml b/tests/integration/targets/ntnx_ndb_databases_single_instance_1/tasks/tests.yml index 65efd06c7..464f71e61 100644 --- a/tests/integration/targets/ntnx_ndb_databases_single_instance_1/tasks/tests.yml +++ b/tests/integration/targets/ntnx_ndb_databases_single_instance_1/tasks/tests.yml @@ -30,13 +30,13 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: name: "{{ vm1_name }}" desc: vm for db server password: "test_password" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -45,7 +45,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "test_key" - + postgres: listener_port: "9999" db_name: testAnsible @@ -62,7 +62,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -72,7 +72,7 @@ auto_tune_staging_drive: False tags: ansible-databases: "single-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -192,7 +192,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -223,14 +223,14 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: create_new_server: ip: "{{ vm_ip }}" name: "{{ vm1_name }}" desc: "vm for db server" password: "{{ vm_password }}" - cluster: + cluster: name: "{{cluster.cluster1.name}}" software_profile: name: "{{ software_profile.name }}" @@ -239,7 +239,7 @@ compute_profile: name: "{{ compute_profile.name }}" pub_ssh_key: "{{ public_ssh_key }}" - + postgres: listener_port: "5432" db_name: testAnsible @@ -252,7 +252,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -261,7 +261,7 @@ snapshots_per_day: 2 tags: ansible-databases: "single-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -280,14 +280,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" - loop: "{{result.response.properties}}" + loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -317,7 +317,7 @@ register: result - name: Verify DB server VM status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -335,16 +335,16 @@ check_mode: yes ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: ansible-databases: "single-instance-dbs-updated" register: result -- name: check mode status - assert: +- name: check mode status + assert: that: - result.response is defined - result.changed == False @@ -357,16 +357,16 @@ - name: update database ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: ansible-databases: "single-instance-dbs-updated" register: result - name: update status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -386,16 +386,16 @@ - name: idempotency checks ntnx_ndb_databases: wait: true - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" name: "{{db1_name_updated}}" desc: "ansible-created-db-desc-updated" - + tags: ansible-databases: "single-instance-dbs-updated" register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -409,13 +409,13 @@ check_mode: yes ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true delete_db_from_vm: true register: result - name: verify delete check mode spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -431,14 +431,14 @@ check_mode: yes ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true soft_delete: true delete_time_machine: true register: result - name: verify soft remove check mode spec - assert: + assert: that: - result.changed == false - result.failed == false @@ -453,13 +453,13 @@ - name: unregister db along with delete time machine ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true delete_time_machine: true register: result - name: verify status of unregister of database with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -494,14 +494,14 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 quaterly: JANUARY log_catchup: 30 snapshots_per_day: 2 - + tags: ansible-databases: "single-instance-dbs" working_directory: "/check" @@ -601,7 +601,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -639,17 +639,17 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 quaterly: JANUARY log_catchup: 30 snapshots_per_day: 2 - + tags: ansible-databases: "single-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -666,14 +666,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" - loop: "{{result.response.properties}}" + loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -696,7 +696,7 @@ - set_fact: - db_uuid: "{{result.db_uuid}}" + db_uuid: "{{result.db_uuid}}" #####################################INFO Module tests####################################################### - debug: @@ -794,14 +794,14 @@ - name: unregister db along with delete time machine ntnx_ndb_databases: - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" state: "absent" wait: true delete_time_machine: true register: result - name: verify status of delete of database along with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -821,7 +821,7 @@ register: result - name: check delete status - assert: + assert: that: - result.response is defined - result.changed == True diff --git a/tests/integration/targets/ntnx_ndb_databases_single_instance_2/readme.md b/tests/integration/targets/ntnx_ndb_databases_single_instance_2/readme.md index 5b9468ff1..95be7ebca 100644 --- a/tests/integration/targets/ntnx_ndb_databases_single_instance_2/readme.md +++ b/tests/integration/targets/ntnx_ndb_databases_single_instance_2/readme.md @@ -1,3 +1,3 @@ ### Modules Tested: 1. ntnx_ndb_databases -2. ntns_ndb_register_database \ No newline at end of file +2. ntns_ndb_register_database diff --git a/tests/integration/targets/ntnx_ndb_databases_single_instance_2/tasks/tests.yml b/tests/integration/targets/ntnx_ndb_databases_single_instance_2/tasks/tests.yml index 59287e1f4..f213c1b8d 100644 --- a/tests/integration/targets/ntnx_ndb_databases_single_instance_2/tasks/tests.yml +++ b/tests/integration/targets/ntnx_ndb_databases_single_instance_2/tasks/tests.yml @@ -38,7 +38,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -62,11 +62,11 @@ db_params_profile: name: "{{db_params_profile.name}}" - + db_vm: use_registered_server: name: "{{ vm1_name }}" - + postgres: db_name: testAnsible db_password: "{{ vm_password }}" @@ -77,7 +77,7 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 @@ -95,7 +95,7 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.properties}}" no_log: true @@ -103,7 +103,7 @@ # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -132,14 +132,14 @@ - name: unregister db along with delete time machine and unregister db servr vm ntnx_ndb_databases: state: "absent" - db_uuid: "{{db_uuid}}" + db_uuid: "{{db_uuid}}" wait: true delete_time_machine: true unregister_db_server_vms: True register: result - name: verify status of unregister of database with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false @@ -176,10 +176,10 @@ desc: TM-desc sla: name: "{{ sla.name }}" - + tags: ansible-databases: "single-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -257,7 +257,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == False @@ -277,7 +277,7 @@ fail_msg: "Unable to create register database spec" success_msg: "single instance postgres database register spec created successfully" - + - name: register previously unregistered DB from previously unregistered DB server vm ntnx_ndb_register_database: @@ -306,17 +306,17 @@ desc: TM-desc sla: name: "{{ sla.name }}" - schedule: + schedule: daily: "11:10:02" weekly: WEDNESDAY monthly: 4 quaterly: JANUARY log_catchup: 30 snapshots_per_day: 2 - + tags: ansible-databases: "single-instance-dbs" - + automated_patching: maintenance_window: name: "{{ maintenance.window_name }}" @@ -333,15 +333,15 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" - loop: "{{result.response.properties}}" + loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'READY' @@ -368,19 +368,19 @@ - name: delete db along with delete time machine and db server vms ntnx_ndb_databases: - db_uuid: "{{result.db_uuid}}" + db_uuid: "{{result.db_uuid}}" state: "absent" wait: true delete_time_machine: true - unregister_db_server_vms: True + unregister_db_server_vms: True register: result - name: verify status of delete of database along with time machine delete - assert: + assert: that: - result.changed == True - result.failed == false - result.response.status == "5" - result.response.db_server_vms_delete_status.status == "5" fail_msg: "database delete failed" - success_msg: "database deleted successfully" \ No newline at end of file + success_msg: "database deleted successfully" diff --git a/tests/integration/targets/ntnx_ndb_db_server_vms/readme.md b/tests/integration/targets/ntnx_ndb_db_server_vms/readme.md index 465d8df4c..51bf107ad 100644 --- a/tests/integration/targets/ntnx_ndb_db_server_vms/readme.md +++ b/tests/integration/targets/ntnx_ndb_db_server_vms/readme.md @@ -3,4 +3,4 @@ This test flow tests db server vm provision, unregister, register, update and de ### Modules Tested: 1. ntnx_ndb_db_server_vms -2. ntns_ndb_register_db_server_vm \ No newline at end of file +2. ntns_ndb_register_db_server_vm diff --git a/tests/integration/targets/ntnx_ndb_db_server_vms/tasks/crud.yml b/tests/integration/targets/ntnx_ndb_db_server_vms/tasks/crud.yml index 60f07a1c4..7f3bf3844 100644 --- a/tests/integration/targets/ntnx_ndb_db_server_vms/tasks/crud.yml +++ b/tests/integration/targets/ntnx_ndb_db_server_vms/tasks/crud.yml @@ -46,9 +46,9 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create action_arguments map - set_fact: + set_fact: action_arguments: "{{ action_arguments | default({}) | combine ({ item['name'] : item['value'] }) }}" - loop: "{{check_mode_result.response.actionArguments}}" + loop: "{{check_mode_result.response.actionArguments}}" no_log: true # {% endraw %} @@ -133,7 +133,7 @@ } - name: Check mode Status - assert: + assert: that: - check_mode_result == expected_result fail_msg: "Unable to generate create db server vm spec with time machine as source" @@ -224,7 +224,7 @@ } - name: Check mode Status - assert: + assert: that: - result == expected_result fail_msg: "Unable to generate create db server vm spec with time machine as source and given names of profile" @@ -263,14 +263,14 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties: "{{ properties | default({}) | combine ({ item['name'] : item['value'] }) }}" - loop: "{{result.response.properties}}" + loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -311,7 +311,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -339,7 +339,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -359,7 +359,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -530,9 +530,9 @@ db_server_clusters: - uuid: "test_cluter_1" - uuid: "test_cluter_2" - maintenance_window: + maintenance_window: name: "{{maintenance.window_name}}" - tasks: + tasks: - type: "OS_PATCHING" pre_task_cmd: "ls -a" post_task_cmd: "ls" @@ -583,7 +583,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result @@ -596,7 +596,7 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - uuid: "{{db_server_uuid}}" - maintenance_window: + maintenance_window: uuid: "{{maintenance.window_uuid}}" tasks: [] register: result @@ -619,7 +619,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result @@ -631,7 +631,7 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - uuid: "{{db_server_uuid}}" - maintenance_window: + maintenance_window: uuid: "{{maintenance.window_uuid}}" tasks: [] register: result @@ -646,14 +646,14 @@ when: entity_tasks_associations == "" - name: creating list of tasks associated to db server vm - set_fact: + set_fact: tasks: "{{ tasks | default([]) | union ([item]]) }}" - loop: "{{entity_tasks_associations}}" + loop: "{{entity_tasks_associations}}" when: item['entity']['id'] == db_server_uuid no_log: true - name: Check update status - assert: + assert: that: - result.changed == true - result.failed == false @@ -667,9 +667,9 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - name: "{{vm1_name_updated}}" - maintenance_window: + maintenance_window: name: "{{maintenance.window_name}}" - tasks: + tasks: - type: "OS_PATCHING" pre_task_cmd: "ls -a" post_task_cmd: "ls" @@ -690,14 +690,14 @@ when: entity_tasks_associations == None - name: creating list of tasks associated with db server vm - set_fact: + set_fact: tasks: "{{ tasks | default([]) | union ([item]) }}" - loop: "{{entity_tasks_associations}}" + loop: "{{entity_tasks_associations}}" when: item['entity']['id'] == db_server_uuid no_log: true - name: Check update status - assert: + assert: that: - result.changed == true - result.failed == false @@ -710,13 +710,13 @@ ntnx_ndb_maintenance_tasks: db_server_vms: - uuid: "{{db_server_uuid}}" - maintenance_window: + maintenance_window: uuid: "{{maintenance.window_uuid}}" tasks: [] register: result - name: Check update status - assert: + assert: that: - result.changed == true - result.failed == false @@ -736,7 +736,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -761,7 +761,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -787,7 +787,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == True @@ -829,7 +829,7 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create action_arguments map - set_fact: + set_fact: action_arguments: "{{ action_arguments | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.actionArguments}}" no_log: true @@ -862,7 +862,7 @@ } - name: Check mode status - assert: + assert: that: - result.response is defined - result.changed == false @@ -901,20 +901,20 @@ - type: "DB_PATCHING" pre_task_cmd: "ls -l" post_task_cmd: "ls -F" - + register: result - + # skip jekyll/Liquid syntax check # {% raw %} - name: create properties map - set_fact: + set_fact: properties1: "{{ properties1 | default({}) | combine ({ item['name'] : item['value'] }) }}" loop: "{{result.response.properties}}" no_log: true # {% endraw %} - name: Creation Status - assert: + assert: that: - result.response is defined - result.response.status == 'UP' @@ -952,7 +952,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == True diff --git a/tests/integration/targets/ntnx_ndb_maintenance_windows/tasks/crud.yml b/tests/integration/targets/ntnx_ndb_maintenance_windows/tasks/crud.yml index 15f1db254..efaa5eb49 100644 --- a/tests/integration/targets/ntnx_ndb_maintenance_windows/tasks/crud.yml +++ b/tests/integration/targets/ntnx_ndb_maintenance_windows/tasks/crud.yml @@ -10,7 +10,7 @@ - set_fact: window1_name: "{{random_name[0]}}1" window2_name: "{{random_name[0]}}2" - + ############################################## create tests #################################### - name: create spec for maintenance window check_mode: yes @@ -46,7 +46,7 @@ } - name: Check mode status - assert: + assert: that: - result == expected_result fail_msg: "Unable to create spec for creating window" @@ -69,7 +69,7 @@ window1_uuid: "{{result.uuid}}" - name: create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -107,7 +107,7 @@ window2_uuid: "{{result.uuid}}" - name: create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -122,8 +122,8 @@ - result.response.schedule.timeZone == "UTC" - result.response.schedule.weekOfMonth == 2 - result.response.schedule.duration == 2 - - + + fail_msg: "Unable to create maintenance window with monthly schedule" success_msg: "maintenance window with monthly schedule created successfully" @@ -136,7 +136,7 @@ register: result - name: Info module status - assert: + assert: that: - result.response is defined - result.changed == False @@ -152,7 +152,7 @@ register: result - name: Info module status - assert: + assert: that: - result.response is defined - result.changed == False @@ -179,7 +179,7 @@ register: result - name: update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -194,7 +194,7 @@ - result.response.schedule.timeZone == "UTC" - result.response.schedule.weekOfMonth == 3 - result.response.schedule.duration == 3 - + fail_msg: "Unable to update maintenance window" success_msg: "maintenance window updated successfully" @@ -212,7 +212,7 @@ register: result - name: create status - assert: + assert: that: - result.response is defined - result.changed == True @@ -227,7 +227,7 @@ - result.response.schedule.timeZone == "UTC" - result.response.schedule.weekOfMonth == None - result.response.schedule.duration == 3 - + fail_msg: "Unable to update maintenance window" success_msg: "maintenance window updated successfully" @@ -247,7 +247,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -265,7 +265,7 @@ - name: update status - assert: + assert: that: - result.response is defined - result.changed == True @@ -279,7 +279,7 @@ - result.response.schedule.timeZone == "UTC" - result.response.schedule.weekOfMonth == None - result.response.schedule.duration == 3 - + fail_msg: "Unable to update maintenance window" success_msg: "maintenance window updated successfully" @@ -315,14 +315,14 @@ ############################################## delete tests #################################### -- name: delete window 1 +- name: delete window 1 ntnx_ndb_maintenance_window: uuid: "{{window1_uuid}}" state: "absent" register: result - name: check delete status - assert: + assert: that: - result.changed == True - result.failed == false @@ -338,10 +338,10 @@ - name: check delete status - assert: + assert: that: - result.changed == True - result.failed == false - result.response.status == "success" fail_msg: "unable to delete window" - success_msg: "window deleted successfully" \ No newline at end of file + success_msg: "window deleted successfully" diff --git a/tests/integration/targets/ntnx_ndb_profiles/meta/main.yml b/tests/integration/targets/ntnx_ndb_profiles/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_profiles/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_profiles/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_profiles/tasks/compute.yml b/tests/integration/targets/ntnx_ndb_profiles/tasks/compute.yml index 0f3521d25..081e0e8f9 100644 --- a/tests/integration/targets/ntnx_ndb_profiles/tasks/compute.yml +++ b/tests/integration/targets/ntnx_ndb_profiles/tasks/compute.yml @@ -4,7 +4,7 @@ ################################################################ -- name: Generate random profile_name +- name: Generate random profile_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -128,7 +128,7 @@ - name: verify unpublish flow in compute profile ntnx_ndb_profiles: profile_uuid: "{{result.profile_uuid}}" - + type: compute compute: publish: false diff --git a/tests/integration/targets/ntnx_ndb_profiles/tasks/db_params.yml b/tests/integration/targets/ntnx_ndb_profiles/tasks/db_params.yml index ce59be447..69c8634a8 100644 --- a/tests/integration/targets/ntnx_ndb_profiles/tasks/db_params.yml +++ b/tests/integration/targets/ntnx_ndb_profiles/tasks/db_params.yml @@ -1,4 +1,4 @@ -- name: Generate random profile_name +- name: Generate random profile_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -6,14 +6,14 @@ suffix_name: "ansible-role-mapping" max_connections: 50 max_replication_slots: 5 - max_locks_per_transaction: 32 + max_locks_per_transaction: 32 effective_io_concurrency: 2 timezone: UTC max_prepared_transactions: 2 max_wal_senders: 5 min_wal_size: 9 max_wal_size: 1 - wal_keep_segments: 500 + wal_keep_segments: 500 max_worker_processes: 4 checkpoint_timeout: 55 autovacuum: "off" @@ -44,7 +44,7 @@ postgres: max_connections: "{{max_connections}}" max_replication_slots: "{{max_replication_slots}}" - max_locks_per_transaction: "{{max_locks_per_transaction}}" + max_locks_per_transaction: "{{max_locks_per_transaction}}" effective_io_concurrency: "{{effective_io_concurrency}}" timezone: "{{timezone}}" max_prepared_transactions: "{{max_prepared_transactions}}" @@ -225,4 +225,4 @@ success_msg: "All Database_Parameter profiles deleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_ndb_profiles/tasks/network_profile.yml b/tests/integration/targets/ntnx_ndb_profiles/tasks/network_profile.yml index e4089a412..6ed797ebc 100644 --- a/tests/integration/targets/ntnx_ndb_profiles/tasks/network_profile.yml +++ b/tests/integration/targets/ntnx_ndb_profiles/tasks/network_profile.yml @@ -1,4 +1,4 @@ -- name: Generate random profile_name +- name: Generate random profile_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -20,8 +20,8 @@ network: topology: single vlans: - - - cluster: + - + cluster: name: "{{network_profile.single.cluster.name}}" vlan_name: "{{network_profile.single.vlan_name}}" enable_ip_address_selection: true @@ -100,12 +100,12 @@ # network: # topology: cluster # vlans: -# - -# cluster: +# - +# cluster: # name: "{{network_profile.HA.cluster1.name}}" # vlan_name: "{{network_profile.HA.cluster1.vlan_name}}" -# - -# cluster: +# - +# cluster: # name: "{{network_profile.HA.cluster2.name}}" # vlan_name: "{{network_profile.HA.cluster2.vlan_name}}" @@ -141,12 +141,12 @@ # publish: true # topology: cluster # vlans: -# - -# cluster: +# - +# cluster: # name: "{{network_profile.HA.cluster1.name}}" # vlan_name: "{{network_profile.HA.cluster1.vlan_name2}}" -# - -# cluster: +# - +# cluster: # name: "{{network_profile.HA.cluster2.name}}" # vlan_name: "{{network_profile.HA.cluster2.vlan_name2}}" # register: result @@ -189,4 +189,4 @@ success_msg: "All network profiles deleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_ndb_profiles_info/meta/main.yml b/tests/integration/targets/ntnx_ndb_profiles_info/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_profiles_info/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_profiles_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_profiles_info/tasks/info.yml b/tests/integration/targets/ntnx_ndb_profiles_info/tasks/info.yml index 1cdd23174..8d6837be7 100644 --- a/tests/integration/targets/ntnx_ndb_profiles_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_ndb_profiles_info/tasks/info.yml @@ -87,7 +87,7 @@ - result.response.id == "{{static_network_profile.uuid}}" fail_msg: "Unable to list network profile with available IPs" - success_msg: "Network NDB profiles along with available IPs obtained successfully" + success_msg: "Network NDB profiles along with available IPs obtained successfully" - name: get network profile with available IPs ntnx_ndb_profiles_info: @@ -143,7 +143,7 @@ ################################################################ - name: get NDB profile using NDB profile name ntnx_ndb_profiles_info: - name: "{{profiles.response[0].name}}" + name: "{{profiles.response[0].name}}" register: result ignore_errors: true @@ -153,13 +153,13 @@ - result.response is defined - result.failed == false - result.changed == false - - result.response.id == "{{profiles.response[0].id}}" + - result.response.id == "{{profiles.response[0].id}}" fail_msg: "Unable to get NDB profile using NDB profile name" success_msg: "get NDB profile using NDB profile name finished successfully" ################################################################ - name: List profiles ntnx_ndb_profiles_info: - uuid: "{{profiles.response[0].id}}" + uuid: "{{profiles.response[0].id}}" latest_version: true register: result ignore_errors: true @@ -170,7 +170,7 @@ - result.response is defined - result.failed == false - result.changed == false - - result.response.name == "{{profiles.response[0].name}}" + - result.response.name == "{{profiles.response[0].name}}" fail_msg: "Unable to get NDB profile using NDB profile id" success_msg: "get NDB profile using NDB profile id finished successfully" ################################################################ @@ -190,4 +190,4 @@ - result.failed == true - result.changed == false fail_msg: "module didn't errored out correctly when incorrect name is given" - success_msg: "module errored out correctly when incorrect name is given" \ No newline at end of file + success_msg: "module errored out correctly when incorrect name is given" diff --git a/tests/integration/targets/ntnx_ndb_slas/meta/main.yml b/tests/integration/targets/ntnx_ndb_slas/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_slas/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_slas/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_slas/tasks/CRUD.yml b/tests/integration/targets/ntnx_ndb_slas/tasks/CRUD.yml index 9783b72a2..48bc70291 100644 --- a/tests/integration/targets/ntnx_ndb_slas/tasks/CRUD.yml +++ b/tests/integration/targets/ntnx_ndb_slas/tasks/CRUD.yml @@ -2,7 +2,7 @@ - debug: msg: Start testing ntnx_ndb_slas and ntnx_ndb_slas_info -- name: Generate random profile_name +- name: Generate random profile_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -18,9 +18,9 @@ snapshots_retention: daily: 5 weekly: 6 - monthly: 7 - quarterly: 8 -################################################################ create flow ######################################### + monthly: 7 + quarterly: 8 +################################################################ create flow ######################################### - name: Verify creation of slas with check mode ntnx_ndb_slas: name: "{{profile1_name}}" @@ -126,7 +126,7 @@ - result.sla_uuid is defined fail_msg: "Fail: Unable to update sla " success_msg: "Pass: verify slas update flow finished successfully" -################################################################ update flow ######################################### +################################################################ update flow ######################################### - name: verify slas update flow with check mode ntnx_ndb_slas: sla_uuid: "{{result.sla_uuid}}" @@ -203,7 +203,7 @@ fail_msg: "Unable to list all era slas" success_msg: "era slas listed successfully" ################################################################ -- name: get era slas using it's name +- name: get era slas using it's name ntnx_ndb_slas_info: name: "{{slas.response[0].name}}" register: result diff --git a/tests/integration/targets/ntnx_ndb_snapshots_info/meta/main.yml b/tests/integration/targets/ntnx_ndb_snapshots_info/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_snapshots_info/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_snapshots_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_snapshots_info/tasks/info.yml b/tests/integration/targets/ntnx_ndb_snapshots_info/tasks/info.yml index b0d7780f1..43463a9c7 100644 --- a/tests/integration/targets/ntnx_ndb_snapshots_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_ndb_snapshots_info/tasks/info.yml @@ -16,7 +16,7 @@ fail_msg: "Unable to list all NDB snapshots" success_msg: "NDB snapshots listed successfully" ################################################################ -- name: get NDB snapshots using it's UTC time_zone +- name: get NDB snapshots using it's UTC time_zone ntnx_ndb_snapshots_info: filters: time_zone: UTC @@ -52,7 +52,7 @@ fail_msg: "Unable to get NDB snapshots with time-machine id " success_msg: "get NDB snapshots using with time-machine id" ################################################################ -- name: get NDB snapshots using it's uuid +- name: get NDB snapshots using it's uuid ntnx_ndb_snapshots_info: uuid: "{{snapshots.response[0].id}}" register: result diff --git a/tests/integration/targets/ntnx_ndb_software_profiles/tasks/crud.yml b/tests/integration/targets/ntnx_ndb_software_profiles/tasks/crud.yml index c978d10de..aef0c0daf 100644 --- a/tests/integration/targets/ntnx_ndb_software_profiles/tasks/crud.yml +++ b/tests/integration/targets/ntnx_ndb_software_profiles/tasks/crud.yml @@ -20,7 +20,7 @@ profile1_name_updated: "{{random_name[0]}}-updated" profile2_name: "{{random_name[0]}}2" - + - name: create software profile create spec check_mode: yes @@ -525,7 +525,7 @@ # skip jekyll/Liquid syntax check # {% raw %} - name: create clusters status map - set_fact: + set_fact: clusters: "{{ clusters | default({}) | combine ({ item['nxClusterId'] : item['status'] }) }}" loop: "{{result.response.profile.clusterAvailability}}" no_log: True @@ -548,7 +548,7 @@ - name: delete software profile ntnx_ndb_profiles: profile_uuid: "{{profile_uuid}}" - state: "absent" + state: "absent" register: result diff --git a/tests/integration/targets/ntnx_ndb_tags/tasks/crud.yml b/tests/integration/targets/ntnx_ndb_tags/tasks/crud.yml index 82f41e5c9..b719db279 100644 --- a/tests/integration/targets/ntnx_ndb_tags/tasks/crud.yml +++ b/tests/integration/targets/ntnx_ndb_tags/tasks/crud.yml @@ -21,7 +21,7 @@ tag_value_required: True entity_type: TIME_MACHINE register: result - + - set_fact: expected_response: { "description": "tag-created-by-ansible", @@ -31,7 +31,7 @@ } - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == false @@ -50,7 +50,7 @@ register: result - name: Check create status - assert: + assert: that: - result.response is defined - result.changed == true @@ -75,7 +75,7 @@ register: result - name: Check create status - assert: + assert: that: - result.response is defined - result.changed == true @@ -100,7 +100,7 @@ register: result - name: Check create status - assert: + assert: that: - result.response is defined - result.changed == true @@ -128,7 +128,7 @@ database_tag_uuid: "{{result.uuid}}" - name: check create status - assert: + assert: that: - result.response is defined - result.changed == true @@ -152,7 +152,7 @@ database_tag2_uuid: "{{result.uuid}}" - name: check create status - assert: + assert: that: - result.response is defined - result.changed == true @@ -172,7 +172,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -187,7 +187,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -204,7 +204,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -221,7 +221,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -238,7 +238,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -256,7 +256,7 @@ register: result - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -276,7 +276,7 @@ - name: Check info status - assert: + assert: that: - result.response is defined - result.changed == false @@ -300,7 +300,7 @@ register: result - name: Check update status - assert: + assert: that: - result.response is defined - result.changed == true @@ -326,7 +326,7 @@ - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -345,7 +345,7 @@ - name: check status changes - assert: + assert: that: - result.response is defined - result.changed == true @@ -365,7 +365,7 @@ - name: Check delete status - assert: + assert: that: - result.response is defined - result.changed == true @@ -380,7 +380,7 @@ register: result - name: Check delete status - assert: + assert: that: - result.response is defined - result.changed == true @@ -396,7 +396,7 @@ register: result - name: Check delete status - assert: + assert: that: - result.response is defined - result.changed == true @@ -412,7 +412,7 @@ register: result - name: Check delete status - assert: + assert: that: - result.response is defined - result.changed == true @@ -428,10 +428,10 @@ register: result - name: Check delete status - assert: + assert: that: - result.response is defined - result.changed == true - result.failed == false fail_msg: "Unable to delete tag" - success_msg: "tag deleted successfully" \ No newline at end of file + success_msg: "tag deleted successfully" diff --git a/tests/integration/targets/ntnx_ndb_time_machines_info/meta/main.yml b/tests/integration/targets/ntnx_ndb_time_machines_info/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_time_machines_info/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_time_machines_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_time_machines_info/tasks/info.yml b/tests/integration/targets/ntnx_ndb_time_machines_info/tasks/info.yml index bed307a82..c76966670 100644 --- a/tests/integration/targets/ntnx_ndb_time_machines_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_ndb_time_machines_info/tasks/info.yml @@ -34,7 +34,7 @@ fail_msg: "Unable to list all NDB tms using filter" success_msg: "NDB tms listed successfully using filter" ################################################################ -- name: get NDB tms using it's name +- name: get NDB tms using it's name ntnx_ndb_time_machines_info: name: "{{tms.response[0].name}}" register: result @@ -101,4 +101,4 @@ - result.failed == true - result.changed == false fail_msg: "module didn't errored out correctly when incorrect name is given" - success_msg: "module errored out correctly when incorrect name is given" \ No newline at end of file + success_msg: "module errored out correctly when incorrect name is given" diff --git a/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/meta/main.yml b/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/tasks/data_access_management_and_snapshots.yml b/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/tasks/data_access_management_and_snapshots.yml index 2cce408d1..57ced74b3 100644 --- a/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/tasks/data_access_management_and_snapshots.yml +++ b/tests/integration/targets/ntnx_ndb_time_machines_with_multi_clusters/tasks/data_access_management_and_snapshots.yml @@ -57,7 +57,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -92,7 +92,7 @@ fail_msg: "fail: Unable to create snapshot for secondary cluster" success_msg: "pass: snapshot created successfully for secondary cluster" - + - name: wait for 2 minutes for replication to finish from source cluster to cluster2 ansible.builtin.pause: minutes: 2 @@ -196,7 +196,7 @@ ####################### -- name: delete time machine +- name: delete time machine ntnx_ndb_time_machine_clusters: state: absent time_machine_uuid: "{{time_machine.uuid}}" @@ -260,8 +260,8 @@ fail_msg: "fail: Unable to update data access instance with sla uuid" success_msg: "pass: update data access instance with sla uuid finished successfully" -- name: delete time machine - ntnx_ndb_time_machine_clusters: +- name: delete time machine + ntnx_ndb_time_machine_clusters: state: absent time_machine_uuid: "{{result.time_machine_uuid}}" cluster: @@ -278,4 +278,4 @@ fail_msg: "fail: Unable to remove cluster from time machine" success_msg: "pass: cluster from time machine removed successfully" -####################### \ No newline at end of file +####################### diff --git a/tests/integration/targets/ntnx_ndb_vlans/meta/main.yml b/tests/integration/targets/ntnx_ndb_vlans/meta/main.yml index 6397436fc..ea2e9da19 100644 --- a/tests/integration/targets/ntnx_ndb_vlans/meta/main.yml +++ b/tests/integration/targets/ntnx_ndb_vlans/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_ndb_env \ No newline at end of file + - prepare_ndb_env diff --git a/tests/integration/targets/ntnx_ndb_vlans/tasks/create_vlans.yml b/tests/integration/targets/ntnx_ndb_vlans/tasks/create_vlans.yml index 79089f56b..adcdcc300 100644 --- a/tests/integration/targets/ntnx_ndb_vlans/tasks/create_vlans.yml +++ b/tests/integration/targets/ntnx_ndb_vlans/tasks/create_vlans.yml @@ -277,7 +277,7 @@ ################################################################ -- name: update ndb vLAN Configuration +- name: update ndb vLAN Configuration ntnx_ndb_vlans: vlan_uuid: "{{result.vlan_uuid}}" gateway: "{{ndb_vlan.updated_gateway}}" @@ -307,7 +307,7 @@ ################################################################ -- name: update ndb vlan type +- name: update ndb vlan type ntnx_ndb_vlans: vlan_uuid: "{{result.vlan_uuid}}" vlan_type: DHCP @@ -431,4 +431,4 @@ fail_msg: "unable to delete all created vlan's" success_msg: "All vlan'sdeleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_ndb_vlans/tasks/negativ_scenarios.yml b/tests/integration/targets/ntnx_ndb_vlans/tasks/negativ_scenarios.yml index aa716309c..ad41fd7eb 100644 --- a/tests/integration/targets/ntnx_ndb_vlans/tasks/negativ_scenarios.yml +++ b/tests/integration/targets/ntnx_ndb_vlans/tasks/negativ_scenarios.yml @@ -25,7 +25,7 @@ - result.changed == false - result.failed == true - result.msg == "Failed generating create vlan spec" - fail_msg: "fail: create Dhcp ndb vlan with static Configuration finished successfully" + fail_msg: "fail: create Dhcp ndb vlan with static Configuration finished successfully" success_msg: "pass: Returnerd error as expected" # ############################### - name: create static ndb vlan with missing Configuration @@ -72,7 +72,7 @@ success_msg: "pass: create Dhcp ndb vlan finished successfully" - set_fact: - todelete: "{{ todelete + [ result.vlan_uuid ] }}" + todelete: "{{ todelete + [ result.vlan_uuid ] }}" ###################### - name: update dhcp ndb vlan with static Configuration ntnx_ndb_vlans: @@ -99,7 +99,7 @@ - result.changed == false - result.failed == true - result.msg == "Failed generating update vlan spec" - fail_msg: "fail: update dhcp ndb vlan with static Configuration finished successfully" + fail_msg: "fail: update dhcp ndb vlan with static Configuration finished successfully" success_msg: "pass: Returnerd error as expected" ################################## @@ -123,4 +123,4 @@ success_msg: "All vlan'sdeleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_ova/tasks/create_ova.yml b/tests/integration/targets/ntnx_ova/tasks/create_ova.yml index c116c08b0..685690e4a 100644 --- a/tests/integration/targets/ntnx_ova/tasks/create_ova.yml +++ b/tests/integration/targets/ntnx_ova/tasks/create_ova.yml @@ -69,7 +69,7 @@ fail_msg: 'Fail: Unable to create VMDK ova_image ' success_msg: 'Success: create VMDK ova_image successfully ' ######################################### -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: "{{ vm.vm_uuid }}" diff --git a/tests/integration/targets/ntnx_permissions_info/tasks/permissions_info.yml b/tests/integration/targets/ntnx_permissions_info/tasks/permissions_info.yml index 833265d85..0a91ee46d 100644 --- a/tests/integration/targets/ntnx_permissions_info/tasks/permissions_info.yml +++ b/tests/integration/targets/ntnx_permissions_info/tasks/permissions_info.yml @@ -24,7 +24,7 @@ - name: List permissions using filter criteria ntnx_permissions_info: - filter: + filter: name: "{{ test_permission_name }}" register: result ignore_errors: True @@ -44,7 +44,7 @@ - set_fact: test_permission_uuid: "{{result.response.entities.0.metadata.uuid}}" -################################################## +################################################## - name: List permission using uuid criteria ntnx_permissions_info: @@ -64,7 +64,7 @@ success_msg: "permission info obtained successfully" -################################################## +################################################## - name: List permissions using length and offset ntnx_permissions_info: @@ -82,4 +82,4 @@ - result.response.entities | length == 1 fail_msg: "Unable to list permissions using length and offset" success_msg: "permissions listed successfully using length and offset" -################################################## \ No newline at end of file +################################################## diff --git a/tests/integration/targets/ntnx_projects/tasks/create_project.yml b/tests/integration/targets/ntnx_projects/tasks/create_project.yml index 57bf3cb9c..220cc38b1 100644 --- a/tests/integration/targets/ntnx_projects/tasks/create_project.yml +++ b/tests/integration/targets/ntnx_projects/tasks/create_project.yml @@ -2,7 +2,7 @@ debug: msg: "Start ntnx_project create tests" -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -40,7 +40,7 @@ ntnx_projects: name: "{{project2_name}}" desc: desc-123 - subnets: + subnets: - name: "{{ network.dhcp.name }}" - uuid: "{{ static.uuid }}" default_subnet: @@ -63,7 +63,7 @@ - result.changed == false - result.response.spec.name == "{{project2_name}}" - result.response.spec.description == 'desc-123' - - result.response.spec.resources.resource_domain.resources[0].limit == 2046 + - result.response.spec.resources.resource_domain.resources[0].limit == 2046 - result.response.spec.resources.resource_domain.resources[0].resource_type == 'STORAGE' - result.response.spec.resources.user_reference_list[0].uuid == "{{ users[0] }}" - result.response.spec.resources.user_reference_list[1].uuid == "{{ users[1] }}" @@ -83,7 +83,7 @@ desc: desc-123 clusters: - "{{ cluster.uuid }}" - subnets: + subnets: - name: "{{ network.dhcp.name }}" - uuid: "{{ static.uuid }}" - name: "{{ overlay.name }}" @@ -115,7 +115,7 @@ - result.response.status.state == 'COMPLETE' - result.response.status.name == "{{project2_name}}" - result.response.status.description == 'desc-123' - - result.response.status.resources.resource_domain.resources[0].limit == 2046 + - result.response.status.resources.resource_domain.resources[0].limit == 2046 - result.response.status.resources.resource_domain.resources[0].resource_type == 'STORAGE' - result.response.status.resources.subnet_reference_list | length == 3 - result.response.status.resources.subnet_reference_list[0].uuid in "{{expected_subnets}}" @@ -160,4 +160,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_projects/tasks/projects_with_role_mappings.yml b/tests/integration/targets/ntnx_projects/tasks/projects_with_role_mappings.yml index 757c8edea..2dd21fe6a 100644 --- a/tests/integration/targets/ntnx_projects/tasks/projects_with_role_mappings.yml +++ b/tests/integration/targets/ntnx_projects/tasks/projects_with_role_mappings.yml @@ -2,7 +2,7 @@ debug: msg: "Start ntnx_project tests with role mappings" -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -60,7 +60,7 @@ desc: desc-123 clusters: - "{{ cluster.uuid }}" - subnets: + subnets: - name: "{{ network.dhcp.name }}" - uuid: "{{ static.uuid }}" - name: "{{ overlay.name }}" @@ -75,13 +75,13 @@ limit: 1 collaboration: false role_mappings: - - user: + - user: uuid: "{{users[0]}}" role: name: "{{roles[0]}}" - user: uuid: "{{users[1]}}" - role: + role: name: "{{roles[1]}}" - user: principal_name: "{{new_user}}" @@ -106,7 +106,7 @@ - result.response.status.state == 'COMPLETE' - result.response.status.project_status.name == "{{project2_name}}" - result.response.status.project_status.description == 'desc-123' - - result.response.status.project_status.resources.resource_domain.resources[0].limit == 1 + - result.response.status.project_status.resources.resource_domain.resources[0].limit == 1 - result.response.status.project_status.resources.resource_domain.resources[0].resource_type == 'VCPUS' - result.response.status.project_status.resources.subnet_reference_list | length == 3 - result.response.status.project_status.resources.subnet_reference_list[0].uuid in "{{expected_subnets}}" @@ -136,7 +136,7 @@ ntnx_projects: project_uuid: "{{result.project_uuid}}" name: "{{project3_name}}" - subnets: + subnets: - name: "{{ network.dhcp.name }}" - uuid: "{{ static.uuid }}" default_subnet: @@ -160,9 +160,9 @@ uuid: "{{users[1]}}" - role: name: "{{acp.role.name}}" - user_group: + user_group: uuid: "{{user_groups[0]}}" - + register: result ignore_errors: True @@ -172,15 +172,15 @@ response_acp: "{{result.response.status.access_control_policy_list_status[0].access_control_policy_status.resources}}" - set_fact: acp_users: ["{{response_acp.user_reference_list[0].uuid}}", "{{response_acp.user_reference_list[1].uuid}}"] -- set_fact: +- set_fact: sorted_acp_users: '{{ acp_users | sort() }}' -- set_fact: +- set_fact: expected_users: ["{{users[0]}}", "{{users[1]}}"] -- set_fact: +- set_fact: expected_users_sorted: '{{ expected_users | sort() }}' -- set_fact: +- set_fact: project_user_reference_list: ["{{result.response.status.project_status.resources.user_reference_list[0].uuid}}", "{{result.response.status.project_status.resources.user_reference_list[1].uuid}}"] -- set_fact: +- set_fact: project_user_references_sorted: '{{ project_user_reference_list|sort() }}' - set_fact: expected_quotas: [ @@ -207,8 +207,8 @@ quotas: "{{result.response.status.project_status.resources.resource_domain.resources}}" - set_fact: - sorted_quotas: "{{ quotas| sort(attribute='resource_type') }}" - sorted_expected_quotas: "{{ expected_quotas | sort(attribute='resource_type') }}" + sorted_quotas: "{{ quotas| sort(attribute='resource_type') }}" + sorted_expected_quotas: "{{ expected_quotas | sort(attribute='resource_type') }}" - name: Creation Status assert: @@ -242,7 +242,7 @@ ntnx_projects: project_uuid: "{{result.project_uuid}}" name: "{{project3_name}}" - subnets: + subnets: - name: "{{ network.dhcp.name }}" - uuid: "{{ static.uuid }}" default_subnet: @@ -266,7 +266,7 @@ uuid: "{{users[1]}}" - role: name: "{{acp.role.name}}" - user_group: + user_group: uuid: "{{user_groups[0]}}" register: result ignore_errors: true diff --git a/tests/integration/targets/ntnx_projects/tasks/update_project.yml b/tests/integration/targets/ntnx_projects/tasks/update_project.yml index 47b909247..4d88442d1 100644 --- a/tests/integration/targets/ntnx_projects/tasks/update_project.yml +++ b/tests/integration/targets/ntnx_projects/tasks/update_project.yml @@ -2,7 +2,7 @@ debug: msg: "Start ntnx_project update tests" -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -17,7 +17,7 @@ ntnx_projects: name: "{{project1_name}}" desc: desc-123 - subnets: + subnets: - name: "{{ network.dhcp.name }}" default_subnet: name: "{{ network.dhcp.name }}" @@ -48,7 +48,7 @@ desc: desc-123-updated clusters: - "{{ cluster.uuid }}" - subnets: + subnets: - uuid: "{{ static.uuid }}" default_subnet: uuid: "{{ static.uuid }}" @@ -68,7 +68,7 @@ - result.response is defined - result.changed == false - result.response.spec.description == 'desc-123-updated' - - result.response.spec.resources.resource_domain.resources[0].limit == 2046 + - result.response.spec.resources.resource_domain.resources[0].limit == 2046 - result.response.spec.resources.resource_domain.resources[0].resource_type == 'MEMORY' - result.response.spec.resources.user_reference_list[0].uuid == "{{ users[1] }}" - result.response.spec.resources.external_user_group_reference_list[0].uuid == "{{ user_groups[0] }}" @@ -87,7 +87,7 @@ desc: desc-123-updated clusters: - "{{ cluster.uuid }}" - subnets: + subnets: - uuid: "{{ static.uuid }}" default_subnet: uuid: "{{ static.uuid }}" @@ -112,7 +112,7 @@ - result.changed == true - result.response.status.state == 'COMPLETE' - result.response.status.description == 'desc-123-updated' - - result.response.status.resources.resource_domain.resources[0].limit == 2046 + - result.response.status.resources.resource_domain.resources[0].limit == 2046 - result.response.status.resources.resource_domain.resources[0].resource_type == 'STORAGE' - result.response.status.resources.user_reference_list[0].uuid == "{{ users[1] }}" - result.response.status.resources.external_user_group_reference_list[0].uuid == "{{ user_groups[0] }}" @@ -131,7 +131,7 @@ ntnx_projects: project_uuid: "{{ result.project_uuid }}" desc: desc-123-updated - subnets: + subnets: - uuid: "{{ static.uuid }}" default_subnet: uuid: "{{ static.uuid }}" @@ -168,4 +168,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_projects_info/tasks/projects_info.yml b/tests/integration/targets/ntnx_projects_info/tasks/projects_info.yml index 214b7485f..bba5652d0 100644 --- a/tests/integration/targets/ntnx_projects_info/tasks/projects_info.yml +++ b/tests/integration/targets/ntnx_projects_info/tasks/projects_info.yml @@ -2,7 +2,7 @@ debug: msg: "Start ntnx_project_info tests" -- name: Generate random project_name +- name: Generate random project_name set_fact: random_name: "{{query('community.general.random_string',numbers=false, special=false,length=12)[0]}}" @@ -25,7 +25,7 @@ name: "{{project2_name}}" collaboration: True role_mappings: - - role: + - role: name: "{{roles[0]}}" user: uuid: "{{users[0]}}" @@ -38,7 +38,7 @@ - set_fact: todelete: "{{ todelete + [ project_2.project_uuid ] }}" -################################################## +################################################## - name: List project using name filter criteria ntnx_projects_info: @@ -55,7 +55,7 @@ fail_msg: "Unable to list projects using filter" success_msg: "Project info obtained successfully" -################################################## +################################################## - name: List all projects ntnx_projects_info: @@ -70,7 +70,7 @@ fail_msg: "Unable to list all projects" success_msg: "Project info of all projects obtained successfully" -################################################## +################################################## - name: List project using project uuid criteria ntnx_projects_info: @@ -87,7 +87,7 @@ fail_msg: "Unable to list projects using uuid" success_msg: "Project info obtained successfully" -################################################## +################################################## - name: List project using project uuid criteria including acps ntnx_projects_info: @@ -101,13 +101,13 @@ that: - result.response is defined - result.response.status.name == "{{ project2_name }}" - - result.response.acps is defined + - result.response.acps is defined - result.response.acps | length == 1 - result.response.metadata.kind == "project" fail_msg: "Unable to list projects with acps using uuid" success_msg: "Project info obtained successfully" -################################################## +################################################## - name: List project using length and offset ntnx_projects_info: length: 1 @@ -148,4 +148,4 @@ ignore_errors: True - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_projects_info/vars/main.yml b/tests/integration/targets/ntnx_projects_info/vars/main.yml index 73b314ff7..ed97d539c 100644 --- a/tests/integration/targets/ntnx_projects_info/vars/main.yml +++ b/tests/integration/targets/ntnx_projects_info/vars/main.yml @@ -1 +1 @@ ---- \ No newline at end of file +--- diff --git a/tests/integration/targets/ntnx_protection_rules/aliases b/tests/integration/targets/ntnx_protection_rules/aliases index 87e7bdaae..7a68b11da 100644 --- a/tests/integration/targets/ntnx_protection_rules/aliases +++ b/tests/integration/targets/ntnx_protection_rules/aliases @@ -1 +1 @@ -disabled \ No newline at end of file +disabled diff --git a/tests/integration/targets/ntnx_protection_rules/tasks/protection_rules.yml b/tests/integration/targets/ntnx_protection_rules/tasks/protection_rules.yml index 0571559ca..0c2d9e7ce 100644 --- a/tests/integration/targets/ntnx_protection_rules/tasks/protection_rules.yml +++ b/tests/integration/targets/ntnx_protection_rules/tasks/protection_rules.yml @@ -49,7 +49,7 @@ - result.response.spec.resources.availability_zone_connectivity_list[1]["source_availability_zone_index"] == 1 - result.response.spec.resources.availability_zone_connectivity_list[1]["snapshot_schedule_list"][0]["auto_suspend_timeout_secs"] == 10 - result.response.spec.resources.availability_zone_connectivity_list[1]["snapshot_schedule_list"][0]["recovery_point_objective_secs"] == 0 - + fail_msg: "Unable to create spec for protection rule with synchronous schedule with check mode" success_msg: "Protection policy with with synchronous schedule spec generated using check mode" @@ -102,7 +102,7 @@ - result.response.status.resources.availability_zone_connectivity_list[1]["source_availability_zone_index"] == 1 - result.response.status.resources.availability_zone_connectivity_list[1]["snapshot_schedule_list"][0]["auto_suspend_timeout_secs"] == 10 - result.response.status.resources.availability_zone_connectivity_list[1]["snapshot_schedule_list"][0]["recovery_point_objective_secs"] == 0 - + fail_msg: "Unable to create protection rule with synchronous schedule" success_msg: "Protection policy with with synchronous schedule created successfully" @@ -308,7 +308,7 @@ register: temp_result - name: idempotency check status - assert: + assert: that: - temp_result.changed == False - temp_result.failed == False @@ -335,7 +335,7 @@ that: - temp_result.response is defined - temp_result.changed == false - - temp_result.response.spec.name == "test-ansible-updated-check-mode" + - temp_result.response.spec.name == "test-ansible-updated-check-mode" fail_msg: "Unable to generate update spec using check mode" success_msg: "Protection policy update spec generated successfully" @@ -350,7 +350,7 @@ register: result - name: delete Status - assert: + assert: that: - result.response is defined - result.changed == True diff --git a/tests/integration/targets/ntnx_protection_rules_info/aliases b/tests/integration/targets/ntnx_protection_rules_info/aliases index 87e7bdaae..7a68b11da 100644 --- a/tests/integration/targets/ntnx_protection_rules_info/aliases +++ b/tests/integration/targets/ntnx_protection_rules_info/aliases @@ -1 +1 @@ -disabled \ No newline at end of file +disabled diff --git a/tests/integration/targets/ntnx_protection_rules_info/tasks/rules_info.yml b/tests/integration/targets/ntnx_protection_rules_info/tasks/rules_info.yml index 454d80d7f..f4eb5e680 100644 --- a/tests/integration/targets/ntnx_protection_rules_info/tasks/rules_info.yml +++ b/tests/integration/targets/ntnx_protection_rules_info/tasks/rules_info.yml @@ -105,7 +105,7 @@ - set_fact: test_rule_uuid: "{{result.response.entities.1.metadata.uuid}}" -################################################## +################################################## - name: List protection rule using uuid criteria ntnx_protection_rules_info: @@ -126,11 +126,11 @@ fail_msg: "Unable to list rule using uuid" success_msg: "rule info obtained successfully" -################################################## +################################################## - name: List protection rules using filter criteria ntnx_protection_rules_info: - filter: + filter: name: "{{ test_rule_name }}" register: result ignore_errors: True @@ -147,7 +147,7 @@ fail_msg: "Unable to list protection rules using filter" success_msg: "protection rule info obtained successfully" -################################################## +################################################## - name: List rules using length and offset ntnx_protection_rules_info: @@ -180,4 +180,4 @@ state: absent wait: True rule_uuid: "{{ rule_2.rule_uuid }}" - register: result \ No newline at end of file + register: result diff --git a/tests/integration/targets/ntnx_recovery_plans_and_jobs/tasks/crud.yml b/tests/integration/targets/ntnx_recovery_plans_and_jobs/tasks/crud.yml index baa5ec94b..6a35bc2c2 100644 --- a/tests/integration/targets/ntnx_recovery_plans_and_jobs/tasks/crud.yml +++ b/tests/integration/targets/ntnx_recovery_plans_and_jobs/tasks/crud.yml @@ -265,7 +265,7 @@ register: result -- set_fact: +- set_fact: plan_uuid: "{{result.plan_uuid}}" - name: Creation Status @@ -334,7 +334,7 @@ } ] } - ] + ] expected_network_mapping_list: [ { "are_networks_stretched": false, @@ -413,7 +413,7 @@ ] } } - + - name: Checkmode spec for Update recovery plan. Update networks and stages. check_mode: yes ntnx_recovery_plans: @@ -576,7 +576,7 @@ register: result - name: idempotency check status - assert: + assert: that: - result.changed == False - result.failed == False @@ -606,7 +606,7 @@ register: result - name: assert job status - assert: + assert: that: - result.changed == false - result.failed == true @@ -634,7 +634,7 @@ - name: assert job status - assert: + assert: that: - test_failover_job.changed == true - test_failover_job.failed == false @@ -660,7 +660,7 @@ - name: assert job status - assert: + assert: that: - result.changed == true - result.failed == false @@ -681,7 +681,7 @@ register: result - name: delete Status - assert: + assert: that: - result.response is defined - result.changed == True diff --git a/tests/integration/targets/ntnx_recovery_plans_and_jobs_info/tasks/info.yml b/tests/integration/targets/ntnx_recovery_plans_and_jobs_info/tasks/info.yml index d4ed5cfec..654b50050 100644 --- a/tests/integration/targets/ntnx_recovery_plans_and_jobs_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_recovery_plans_and_jobs_info/tasks/info.yml @@ -83,7 +83,7 @@ - set_fact: test_plan_uuid: "{{result.response.entities.1.metadata.uuid}}" -################################################## +################################################## - name: List recovery plans using uuid criteria ntnx_recovery_plans_info: @@ -104,11 +104,11 @@ fail_msg: "Unable to list plans using uuid" success_msg: "recovery plan info obtained successfully" -################################################## +################################################## - name: List recovery plans using filter criteria ntnx_recovery_plans_info: - filter: + filter: name: "{{ test_plan_name }}" register: result ignore_errors: True @@ -125,7 +125,7 @@ fail_msg: "Unable to list recovery plan using filter" success_msg: "recovery plan info obtained successfully" -################################################## +################################################## - name: List recovery plan using length and offset ntnx_recovery_plans_info: @@ -180,7 +180,7 @@ no_log: true register: test_job -################################################## +################################################## - name: List all recovery plan jobs ntnx_recovery_plan_jobs_info: @@ -204,7 +204,7 @@ - set_fact: test_job_name_1: "{{ test_job.error.status.name }}" -################################################## +################################################## - name: List recovery plan jobs using uuid criteria ntnx_recovery_plan_jobs_info: @@ -225,12 +225,12 @@ fail_msg: "Unable to list jobs using uuid" success_msg: "recovery plan jobs info obtained successfully" -################################################## +################################################## - name: List recovery plan jobs using filter criteria ntnx_recovery_plan_jobs_info: nutanix_host: "{{recovery_site_ip}}" - filter: + filter: name: "{{ test_job_name_1 }}" register: result ignore_errors: True @@ -247,7 +247,7 @@ fail_msg: "Unable to list recovery plan job using filter" success_msg: "recovery plan job info obtained successfully" -################################################## +################################################## - name: List recovery plan job using length and offset ntnx_recovery_plan_jobs_info: @@ -282,4 +282,4 @@ state: absent wait: True plan_uuid: "{{ recovery_plan2.plan_uuid }}" - register: result \ No newline at end of file + register: result diff --git a/tests/integration/targets/ntnx_roles/meta/main.yml b/tests/integration/targets/ntnx_roles/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_roles/meta/main.yml +++ b/tests/integration/targets/ntnx_roles/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_roles/tasks/create.yml b/tests/integration/targets/ntnx_roles/tasks/create.yml index 4b3721bc7..541965519 100644 --- a/tests/integration/targets/ntnx_roles/tasks/create.yml +++ b/tests/integration/targets/ntnx_roles/tasks/create.yml @@ -33,7 +33,7 @@ p2: "{{ result.response.status.resources.permission_reference_list[1].uuid }}" - name: Creation Status - assert: + assert: that: - result.response is defined - result.role_uuid is defined @@ -63,7 +63,7 @@ ignore_errors: True - name: Creation Status - assert: + assert: that: - result.msg == "Role with given name already exists" - result.changed == False @@ -85,7 +85,7 @@ register: result - name: Creation Status - assert: + assert: that: - result.response is defined - result.changed == False @@ -109,4 +109,4 @@ - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_roles/tasks/delete.yml b/tests/integration/targets/ntnx_roles/tasks/delete.yml index 098c0fdeb..3d4f00410 100644 --- a/tests/integration/targets/ntnx_roles/tasks/delete.yml +++ b/tests/integration/targets/ntnx_roles/tasks/delete.yml @@ -23,7 +23,7 @@ register: test_role - name: Creation Status - assert: + assert: that: - test_role.response is defined - test_role.changed == True @@ -39,10 +39,10 @@ register: result - name: delete Status - assert: + assert: that: - result.response is defined - result.changed == True fail_msg: "role delete failed" - success_msg: "role deleted successfully" \ No newline at end of file + success_msg: "role deleted successfully" diff --git a/tests/integration/targets/ntnx_roles/tasks/update.yml b/tests/integration/targets/ntnx_roles/tasks/update.yml index ace7fc8e2..16644d37e 100644 --- a/tests/integration/targets/ntnx_roles/tasks/update.yml +++ b/tests/integration/targets/ntnx_roles/tasks/update.yml @@ -29,7 +29,7 @@ register: test_role - name: Creation Status - assert: + assert: that: - test_role.response is defined - test_role.changed == True @@ -51,7 +51,7 @@ register: result - name: Update status - assert: + assert: that: - result.response is defined - result.role_uuid is defined @@ -79,7 +79,7 @@ register: result - name: idempotency check status - assert: + assert: that: - result.changed == False - result.failed == False @@ -103,7 +103,7 @@ register: result - name: check mode Status - assert: + assert: that: - result.response is defined - result.changed == False diff --git a/tests/integration/targets/ntnx_roles_info/tasks/roles_info.yml b/tests/integration/targets/ntnx_roles_info/tasks/roles_info.yml index 2a3b80e7d..176a97f46 100644 --- a/tests/integration/targets/ntnx_roles_info/tasks/roles_info.yml +++ b/tests/integration/targets/ntnx_roles_info/tasks/roles_info.yml @@ -22,7 +22,7 @@ - set_fact: test_role_uuid: "{{result.response.entities.1.metadata.uuid}}" -################################################## +################################################## - name: List role using uuid criteria ntnx_roles_info: @@ -41,11 +41,11 @@ fail_msg: "Unable to list role using uuid" success_msg: "role info obtained successfully" -################################################## +################################################## - name: List roles using filter criteria ntnx_roles_info: - filter: + filter: name: "{{ test_role_name }}" register: result ignore_errors: True @@ -62,7 +62,7 @@ fail_msg: "Unable to list roles using filter" success_msg: "role info obtained successfully" -################################################## +################################################## - name: List roles using length and offset ntnx_roles_info: @@ -80,4 +80,4 @@ - result.response.entities | length == 1 fail_msg: "Unable to list roles using length and offset" success_msg: "roles listed successfully using length and offset" -################################################## \ No newline at end of file +################################################## diff --git a/tests/integration/targets/ntnx_security_rules/tasks/app_rule.yml b/tests/integration/targets/ntnx_security_rules/tasks/app_rule.yml index c7f082897..0e9b038e3 100644 --- a/tests/integration/targets/ntnx_security_rules/tasks/app_rule.yml +++ b/tests/integration/targets/ntnx_security_rules/tasks/app_rule.yml @@ -8,14 +8,14 @@ apptype_filter_by_category: AppFamily: - Backup - apptiers: + apptiers: - "{{categories.apptiers[0]}}" - "{{categories.apptiers[1]}}" default_internal_policy: DENY_ALL inbounds: - - + - categories: AppFamily: - Databases @@ -25,7 +25,7 @@ tcp: - start_port: 22 end_port: 80 - - + - categories: AppFamily: - Databases @@ -34,38 +34,38 @@ icmp: - code: 1 type: 1 - - + - categories: AppFamily: - Databases - DevOps - protocol: + protocol: udp: - start_port: 82 end_port: 8080 - - + - categories: AppFamily: - Databases - DevOps - protocol: + protocol: service: name: 6a44 - - + - ip_subnet: prefix_length: 24 ip: 192.168.1.0 description: test description - - + - address: name: dest outbounds: - - + - categories: AppFamily: - Databases - DevOps - protocol: + protocol: icmp: - code: 1 type: 1 @@ -93,12 +93,12 @@ app_rule: policy_mode: APPLY inbounds: - - + - rule_id: "{{result.response.spec.resources.app_rule.inbound_allow_list.0.rule_id}}" state: absent outbounds: - - protocol: + protocol: icmp: - code: 1 type: 1 @@ -145,7 +145,7 @@ apptype_filter_by_category: AppFamily: - Backup - apptiers: + apptiers: - "{{categories.apptiers[0]}}" - "{{categories.apptiers[1]}}" default_internal_policy: DENY_ALL @@ -182,4 +182,4 @@ - result.failed == false - result.response.status == 'SUCCEEDED' fail_msg: ' fail: unable to delete app security rule ' - success_msg: 'pass : delete app security rule successfully' \ No newline at end of file + success_msg: 'pass : delete app security rule successfully' diff --git a/tests/integration/targets/ntnx_security_rules/tasks/isolation_rule.yml b/tests/integration/targets/ntnx_security_rules/tasks/isolation_rule.yml index ee6bda0db..5a7243409 100644 --- a/tests/integration/targets/ntnx_security_rules/tasks/isolation_rule.yml +++ b/tests/integration/targets/ntnx_security_rules/tasks/isolation_rule.yml @@ -1,6 +1,6 @@ - name: >- create isolation security rule with first_entity_filter and - second_entity_filter with check mode + second_entity_filter with check mode ntnx_security_rules: name: test_isolation_rule isolation_rule: @@ -29,7 +29,7 @@ fail_msg: ' fail: unable to create isolation security rule with first_entity_filter and second_entity_filter with check mode ' success_msg: >- pass: create isolation security rule with first_entity_filter and - second_entity_filter successfully with check mode + second_entity_filter successfully with check mode - name: >- create isolation security rule with first_entity_filter and second_entity_filter @@ -81,7 +81,7 @@ - output.security_rule_uuid is none fail_msg: ' fail: unable to update isoloation security rule action with check_mode' success_msg: >- - pass: update isoloation security rule action with check_mode successfully + pass: update isoloation security rule action with check_mode successfully - name: update isoloation security rule action ntnx_security_rules: @@ -130,4 +130,4 @@ - result.failed == false - result.response.status == 'SUCCEEDED' fail_msg: ' fail: unable to delete isolation security rule ' - success_msg: 'pass : delete isolation security rule successfully' \ No newline at end of file + success_msg: 'pass : delete isolation security rule successfully' diff --git a/tests/integration/targets/ntnx_security_rules/tasks/quarantine_rule.yml b/tests/integration/targets/ntnx_security_rules/tasks/quarantine_rule.yml index b4eb996af..dba621b3d 100644 --- a/tests/integration/targets/ntnx_security_rules/tasks/quarantine_rule.yml +++ b/tests/integration/targets/ntnx_security_rules/tasks/quarantine_rule.yml @@ -5,13 +5,13 @@ target_group: default_internal_policy: DENY_ALL inbounds: - - + - categories: AppFamily: - Databases - DevOps outbounds: - - + - categories: AppFamily: - Databases @@ -32,4 +32,4 @@ fail_msg: ' fail: unable to update quarantine_rule by adding inbound and outbound list ' success_msg: >- pass: update quarantine_rule by adding inbound and outbound list - successfully \ No newline at end of file + successfully diff --git a/tests/integration/targets/ntnx_security_rules/tasks/vdi.yml b/tests/integration/targets/ntnx_security_rules/tasks/vdi.yml index 5fa19d511..42896d5ed 100644 --- a/tests/integration/targets/ntnx_security_rules/tasks/vdi.yml +++ b/tests/integration/targets/ntnx_security_rules/tasks/vdi.yml @@ -8,7 +8,7 @@ default_internal_policy: DENY_ALL allow_all_outbounds: true inbounds: - - + - categories: AppFamily: - Databases @@ -18,7 +18,7 @@ tcp: - start_port: 22 end_port: 80 - - + - categories: AppFamily: - Databases @@ -27,24 +27,24 @@ icmp: - code: 1 type: 1 - - + - categories: AppFamily: - Databases - DevOps - protocol: + protocol: udp: - start_port: 82 end_port: 8080 - - + - categories: AppFamily: - Databases - DevOps - protocol: + protocol: service: name: 6a44 - - + - address: name: dest policy_mode: MONITOR @@ -67,7 +67,7 @@ security_rule_uuid: '{{ result.response.metadata.uuid }}' vdi_rule: inbounds: - - + - ip_subnet: prefix_length: 8 ip: 10.0.0.0 @@ -99,4 +99,4 @@ - result.failed == false - result.response.status == 'SUCCEEDED' fail_msg: ' fail: unable to delete vdi_rule security rule ' - success_msg: 'pass : delete vdi_rule security rule successfully' \ No newline at end of file + success_msg: 'pass : delete vdi_rule security rule successfully' diff --git a/tests/integration/targets/ntnx_security_rules_info/tasks/get_security_rules.yml b/tests/integration/targets/ntnx_security_rules_info/tasks/get_security_rules.yml index 6d8004009..fe02bd1bd 100644 --- a/tests/integration/targets/ntnx_security_rules_info/tasks/get_security_rules.yml +++ b/tests/integration/targets/ntnx_security_rules_info/tasks/get_security_rules.yml @@ -83,7 +83,7 @@ security_rule_uuid: '{{ first_rule.response.metadata.uuid }}' register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -92,4 +92,4 @@ - result.response.status == 'SUCCEEDED' fail_msg: ' fail: unable to delete secutiry rule ' success_msg: 'pass: security rule deleted successfully ' -################################### \ No newline at end of file +################################### diff --git a/tests/integration/targets/ntnx_service_groups/meta/main.yml b/tests/integration/targets/ntnx_service_groups/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_service_groups/meta/main.yml +++ b/tests/integration/targets/ntnx_service_groups/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_service_groups/tasks/create.yml b/tests/integration/targets/ntnx_service_groups/tasks/create.yml index f5e592a3e..47b8759cc 100644 --- a/tests/integration/targets/ntnx_service_groups/tasks/create.yml +++ b/tests/integration/targets/ntnx_service_groups/tasks/create.yml @@ -40,7 +40,7 @@ - set_fact: todelete: "{{ todelete + [ result.response.uuid ] }}" -################################################################ +################################################################ - name: create udp service group ntnx_service_groups: name: udp_srvive_group @@ -106,9 +106,9 @@ - result.failed == false - result.response.service_group.service_list[0].protocol == "ICMP" - result.response.service_group.service_list[0].icmp_type_code_list[0].code == 10 - - result.response.service_group.service_list[0].icmp_type_code_list[1].type == 1 + - result.response.service_group.service_list[0].icmp_type_code_list[1].type == 1 - result.response.service_group.service_list[0].icmp_type_code_list[2].code == 3 - - result.response.service_group.service_list[0].icmp_type_code_list[2].type == 2 + - result.response.service_group.service_list[0].icmp_type_code_list[2].type == 2 fail_msg: "Fail: Unable to create icmp service group " success_msg: "Pass: icmp service group created successfully" @@ -129,7 +129,7 @@ any_icmp: True register: result ignore_errors: true - + - name: getting particular service_group using uuid ntnx_service_groups_info: service_group_uuid: '{{ result.service_group_uuid }}' @@ -146,13 +146,13 @@ - result.response.service_group.service_list[0].tcp_port_range_list[0].end_port == 65535 - result.response.service_group.service_list[1].protocol == "UDP" - result.response.service_group.service_list[1].udp_port_range_list[0].start_port == 10 - - result.response.service_group.service_list[1].udp_port_range_list[0].end_port == 50 + - result.response.service_group.service_list[1].udp_port_range_list[0].end_port == 50 - result.response.service_group.service_list[1].udp_port_range_list[1].start_port == 60 - - result.response.service_group.service_list[1].udp_port_range_list[1].end_port == 90 + - result.response.service_group.service_list[1].udp_port_range_list[1].end_port == 90 - result.response.service_group.service_list[1].udp_port_range_list[2].start_port == 99 - - result.response.service_group.service_list[1].udp_port_range_list[2].end_port == 99 + - result.response.service_group.service_list[1].udp_port_range_list[2].end_port == 99 - result.response.service_group.service_list[2].protocol == "ICMP" - - result.response.service_group.service_list[2].icmp_type_code_list == [] + - result.response.service_group.service_list[2].icmp_type_code_list == [] fail_msg: "Fail: Unable to create tcp service group " success_msg: "Pass: tcp service group created successfully" @@ -165,7 +165,7 @@ service_group_uuid: "{{ item }}" register: result loop: "{{ todelete }}" - ignore_errors: True + ignore_errors: True - name: check listing status assert: @@ -177,4 +177,4 @@ success_msg: "All service groups deleted successfully" - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/ntnx_service_groups/tasks/main.yml b/tests/integration/targets/ntnx_service_groups/tasks/main.yml index 6b8a36e1f..c9939d444 100644 --- a/tests/integration/targets/ntnx_service_groups/tasks/main.yml +++ b/tests/integration/targets/ntnx_service_groups/tasks/main.yml @@ -7,4 +7,4 @@ validate_certs: "{{ validate_certs }}" block: - import_tasks: "create.yml" - - import_tasks: "update.yml" \ No newline at end of file + - import_tasks: "update.yml" diff --git a/tests/integration/targets/ntnx_service_groups/tasks/update.yml b/tests/integration/targets/ntnx_service_groups/tasks/update.yml index 2544acac8..2845caa71 100644 --- a/tests/integration/targets/ntnx_service_groups/tasks/update.yml +++ b/tests/integration/targets/ntnx_service_groups/tasks/update.yml @@ -27,8 +27,8 @@ - set_fact: todelete: "{{ todelete + [ service_group.service_group_uuid ] }}" -################################################################ -- name: update tcp service group name and description and other protocols +################################################################ +- name: update tcp service group name and description and other protocols ntnx_service_groups: service_group_uuid: "{{service_group.service_group_uuid}}" name: updated_name @@ -94,7 +94,7 @@ service_group_uuid: "{{ item }}" register: result loop: "{{ todelete }}" - ignore_errors: True + ignore_errors: True - name: check listing status assert: @@ -103,4 +103,4 @@ - result.changed == true - result.msg == "All items completed" fail_msg: "unable to delete all created service groups" - success_msg: "All service groups deleted successfully" \ No newline at end of file + success_msg: "All service groups deleted successfully" diff --git a/tests/integration/targets/ntnx_service_groups_info/meta/main.yml b/tests/integration/targets/ntnx_service_groups_info/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_service_groups_info/meta/main.yml +++ b/tests/integration/targets/ntnx_service_groups_info/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_service_groups_info/tasks/info.yml b/tests/integration/targets/ntnx_service_groups_info/tasks/info.yml index f59db2c01..e621973ec 100644 --- a/tests/integration/targets/ntnx_service_groups_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_service_groups_info/tasks/info.yml @@ -2,7 +2,7 @@ - debug: msg: "start ntnx_service_groups_info tests" -- name: test getting all service groups +- name: test getting all service groups ntnx_service_groups_info: register: service_groups ignore_errors: true diff --git a/tests/integration/targets/ntnx_static_routes/tasks/create.yml b/tests/integration/targets/ntnx_static_routes/tasks/create.yml index e35fc4679..16c81ed50 100644 --- a/tests/integration/targets/ntnx_static_routes/tasks/create.yml +++ b/tests/integration/targets/ntnx_static_routes/tasks/create.yml @@ -19,8 +19,8 @@ uuid: "{{ external_nat_subnet.uuid }}" wait: True register: result - -- set_fact: + +- set_fact: d1: "{{ result.response.status.resources.static_routes_list[0].destination }}" d2: "{{ result.response.status.resources.static_routes_list[1].destination }}" @@ -38,7 +38,7 @@ - result.response.status.resources.default_route["is_active"] == true - result.response.status.resources.default_route["destination"] == "0.0.0.0/0" - result.response.status.resources.default_route["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" - + fail_msg: 'Fail: Unable to update static routes of vpc' success_msg: 'Succes: static routes updated successfully' @@ -63,7 +63,7 @@ register: result - name: check idempotency status - assert: + assert: that: - result.changed == false - result.failed == false @@ -118,7 +118,7 @@ - result.changed == false - result.failed == true fail_msg: "Static routes updated successfully" - success_msg: "Static routes update failed successfully" + success_msg: "Static routes update failed successfully" ########################################################################################################### - name: remove all routes @@ -135,4 +135,4 @@ - result.changed == true - result.response.status.resources.static_routes_list == [] fail_msg: "Static routes remove failed" - success_msg: "Static routes removed successfully" + success_msg: "Static routes removed successfully" diff --git a/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml b/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml index 70ee1bfe6..4b79f1a08 100644 --- a/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml +++ b/tests/integration/targets/ntnx_static_routes_info/tasks/info.yml @@ -18,13 +18,13 @@ external_subnet_ref: uuid: "{{ external_nat_subnet.uuid }}" register: result - + - name: Update static routes list Status assert: that: - result.response is defined - result.response.status.state == 'COMPLETE' - - result.changed == true + - result.changed == true fail_msg: 'Fail: Unable to update static routes of vpc' success_msg: 'Succes: static routes updated successfully' @@ -35,8 +35,8 @@ vpc_uuid: "{{ vpc.uuid }}" register: result - -- set_fact: + +- set_fact: d1: "{{ result.response.status.resources.static_routes_list[0].destination }}" d2: "{{ result.response.status.resources.static_routes_list[1].destination }}" @@ -45,7 +45,7 @@ that: - result.response is defined - result.changed == false - - result.response.status.resources.static_routes_list[0]["is_active"] == true + - result.response.status.resources.static_routes_list[0]["is_active"] == true - ("{{d1}}" == "10.2.2.0/24" and "{{d2}}" == "10.2.3.0/24") or ("{{d2}}" == "10.2.2.0/24" and "{{d1}}" == "10.2.3.0/24") - result.response.status.resources.static_routes_list[0]["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" - result.response.status.resources.static_routes_list[1]["is_active"] == true @@ -53,7 +53,7 @@ - result.response.status.resources.default_route["is_active"] == true - result.response.status.resources.default_route["destination"] == "0.0.0.0/0" - result.response.status.resources.default_route["nexthop"]["external_subnet_reference"]["name"] == "{{ external_nat_subnet.name }}" - + fail_msg: 'Fail: Unable to get static routes for vpc' success_msg: 'Succes' diff --git a/tests/integration/targets/ntnx_user_groups/meta/main.yml b/tests/integration/targets/ntnx_user_groups/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_user_groups/meta/main.yml +++ b/tests/integration/targets/ntnx_user_groups/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_user_groups/tasks/create.yml b/tests/integration/targets/ntnx_user_groups/tasks/create.yml index d512ad077..31fb156e3 100644 --- a/tests/integration/targets/ntnx_user_groups/tasks/create.yml +++ b/tests/integration/targets/ntnx_user_groups/tasks/create.yml @@ -49,7 +49,7 @@ - set_fact: test_user_group_uuid: "{{user_groups.response.entities.0.metadata.uuid}}" -################################################## +################################################## - name: List user_groups using user_group uuid criteria ntnx_user_groups_info: @@ -68,11 +68,11 @@ fail_msg: "Unable to list user group using uuid" success_msg: "user group info obtained successfully" -################################################## +################################################## - name: List user_groups using filter criteria ntnx_user_groups_info: - filter: + filter: name: "{{ test_user_group_name }}" register: result ignore_errors: True @@ -89,7 +89,7 @@ fail_msg: "Unable to list user groups using filter" success_msg: "user group info obtained successfully" -################################################## +################################################## - name: List user groups using length and offset ntnx_user_groups_info: @@ -106,7 +106,7 @@ - result.failed == false - result.response.metadata.total_matches > 0 - result.response.metadata.length == 2 - + fail_msg: "Unable to list user groups using length and offset" success_msg: "user groups listed successfully using length and offset" @@ -181,4 +181,4 @@ # - result.changed == true # - result.response.status == "SUCCEEDED" # fail_msg: "Unable to delete user group with idp " -# success_msg: "user group with idp deleted successfully" \ No newline at end of file +# success_msg: "user group with idp deleted successfully" diff --git a/tests/integration/targets/ntnx_users/meta/main.yml b/tests/integration/targets/ntnx_users/meta/main.yml index 23b0fb268..e4f447d3a 100644 --- a/tests/integration/targets/ntnx_users/meta/main.yml +++ b/tests/integration/targets/ntnx_users/meta/main.yml @@ -1,2 +1,2 @@ dependencies: - - prepare_env \ No newline at end of file + - prepare_env diff --git a/tests/integration/targets/ntnx_users/tasks/create.yml b/tests/integration/targets/ntnx_users/tasks/create.yml index 843a46535..b6bdf0c4b 100644 --- a/tests/integration/targets/ntnx_users/tasks/create.yml +++ b/tests/integration/targets/ntnx_users/tasks/create.yml @@ -6,7 +6,7 @@ ntnx_users: principal_name: "{{principal_name}}" directory_service_uuid: "{{directory_service_uuid}}" - project: + project: uuid: "{{project.uuid}}" register: result ignore_errors: true @@ -65,11 +65,11 @@ - set_fact: todelete: [] ################################################# -- name: create local user with project and categories +- name: create local user with project and categories ntnx_users: principal_name: "{{principal_name}}" directory_service_uuid: "{{directory_service_uuid}}" - project: + project: uuid: "{{project.uuid}}" categories: Environment: @@ -99,7 +99,7 @@ ntnx_users: principal_name: wrong_name directory_service_uuid: "{{directory_service_uuid}}" - project: + project: uuid: "{{project.uuid}}" categories: Environment: @@ -163,7 +163,7 @@ ntnx_users: principal_name: "{{principal_name}}" directory_service_uuid: "{{directory_service_uuid}}" - project: + project: uuid: "{{project.uuid}}" register: result ignore_errors: true @@ -182,4 +182,4 @@ - result.response is defined - result.response.status == 'SUCCEEDED' fail_msg: "Fail: unable to delete users" - success_msg: "Pass: users deleted successfully" \ No newline at end of file + success_msg: "Pass: users deleted successfully" diff --git a/tests/integration/targets/ntnx_users_info/tasks/users_info.yml b/tests/integration/targets/ntnx_users_info/tasks/users_info.yml index 2075216c3..88425c12a 100644 --- a/tests/integration/targets/ntnx_users_info/tasks/users_info.yml +++ b/tests/integration/targets/ntnx_users_info/tasks/users_info.yml @@ -20,7 +20,7 @@ - set_fact: test_user_uuid: "{{users.response.entities.2.metadata.uuid}}" -################################################## +################################################## - name: List users using user uuid criteria ntnx_users_info: @@ -39,11 +39,11 @@ fail_msg: "Unable to list user using uuid" success_msg: "user info obtained successfully" -################################################## +################################################## - name: List users using filter criteria ntnx_users_info: - filter: + filter: username: "{{ test_user_name }}" register: result ignore_errors: True @@ -60,7 +60,7 @@ fail_msg: "Unable to list user using filter" success_msg: "user info obtained successfully" -################################################## +################################################## - name: List users using length and offset ntnx_users_info: @@ -97,4 +97,4 @@ # - result.changed == false # - result.failed ==false # fail_msg: "Unable to list users using ascending name sorting" -# success_msg: "users listed successfully using ascending name sorting" \ No newline at end of file +# success_msg: "users listed successfully using ascending name sorting" diff --git a/tests/integration/targets/ntnx_vms_clone/tasks/create.yml b/tests/integration/targets/ntnx_vms_clone/tasks/create.yml index d21aac449..cf168c02f 100644 --- a/tests/integration/targets/ntnx_vms_clone/tasks/create.yml +++ b/tests/integration/targets/ntnx_vms_clone/tasks/create.yml @@ -20,13 +20,13 @@ name: "{{ cluster.name }}" disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 20 register: vm ignore_errors: true - + - name: Creation Status assert: that: @@ -68,7 +68,7 @@ uuid: "{{ static.uuid }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -101,7 +101,7 @@ success_msg: ' Success: returned response as expected ' fail_msg: ' Fail: clone vm with check_mode ' ########################################### -- name: clone vm with script +- name: clone vm with script ntnx_vms_clone: src_vm_uuid: "{{ vm.vm_uuid }}" guest_customization: @@ -122,13 +122,13 @@ - set_fact: todelete: '{{ todelete + [ result.vm_uuid ] }}' ########################################### -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' loop: '{{ todelete }}' -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent - vm_uuid: '{{ vm.vm_uuid }}' \ No newline at end of file + vm_uuid: '{{ vm.vm_uuid }}' diff --git a/tests/integration/targets/nutanix_floating_ips/tasks/create_floating_ips.yml b/tests/integration/targets/nutanix_floating_ips/tasks/create_floating_ips.yml index 9ae9e8aa8..96ce8c30c 100644 --- a/tests/integration/targets/nutanix_floating_ips/tasks/create_floating_ips.yml +++ b/tests/integration/targets/nutanix_floating_ips/tasks/create_floating_ips.yml @@ -98,8 +98,8 @@ fip_uuid: "{{ item }}" register: result loop: "{{ todelete }}" - ignore_errors: True - + ignore_errors: True + - set_fact: todelete: [] ######################################################### @@ -130,8 +130,8 @@ fip_uuid: "{{ item }}" register: result loop: "{{ todelete }}" - ignore_errors: True - + ignore_errors: True + - set_fact: todelete: [] ######################################################### diff --git a/tests/integration/targets/nutanix_floating_ips/tasks/negative_scenarios.yml b/tests/integration/targets/nutanix_floating_ips/tasks/negative_scenarios.yml index 983711f69..b9cdbd377 100644 --- a/tests/integration/targets/nutanix_floating_ips/tasks/negative_scenarios.yml +++ b/tests/integration/targets/nutanix_floating_ips/tasks/negative_scenarios.yml @@ -71,7 +71,7 @@ fip_uuid: 5 register: result ignore_errors: True - + - name: Creation Status assert: that: diff --git a/tests/integration/targets/nutanix_pbrs/tasks/create_pbrs.yml b/tests/integration/targets/nutanix_pbrs/tasks/create_pbrs.yml index 8e2ffa0d9..0a2f19293 100644 --- a/tests/integration/targets/nutanix_pbrs/tasks/create_pbrs.yml +++ b/tests/integration/targets/nutanix_pbrs/tasks/create_pbrs.yml @@ -19,7 +19,7 @@ protocol: icmp: type: 25 - register: result + register: result ignore_errors: True - name: Creation Status @@ -237,7 +237,7 @@ icmp: code: "{{ icmp.code }}" type: "{{ icmp.type }}" - register: result + register: result ignore_errors: True - set_fact: diff --git a/tests/integration/targets/nutanix_pbrs/vars/main.yml b/tests/integration/targets/nutanix_pbrs/vars/main.yml index e3c0942a3..8db3f93ed 100644 --- a/tests/integration/targets/nutanix_pbrs/vars/main.yml +++ b/tests/integration/targets/nutanix_pbrs/vars/main.yml @@ -14,4 +14,4 @@ udp: port_rangelist: 150-170 icmp: code: 3 - type: 3 \ No newline at end of file + type: 3 diff --git a/tests/integration/targets/nutanix_subnets/tasks/create_subnet.yml b/tests/integration/targets/nutanix_subnets/tasks/create_subnet.yml index 698365411..d5547b424 100644 --- a/tests/integration/targets/nutanix_subnets/tasks/create_subnet.yml +++ b/tests/integration/targets/nutanix_subnets/tasks/create_subnet.yml @@ -82,7 +82,7 @@ - set_fact: todelete: "{{ todelete + [ result.subnet_uuid ] }}" - + - name: Delete all Created Subnets ntnx_subnets: state: absent @@ -124,7 +124,7 @@ - set_fact: todelete: "{{ todelete + [ result.subnet_uuid ] }}" - + - name: Delete all Created Subnets ntnx_subnets: state: absent @@ -132,7 +132,7 @@ register: result loop: "{{ todelete }}" ignore_errors: True - + - set_fact: todelete: [] ################################################################# @@ -299,7 +299,7 @@ - result.response.status.state == 'COMPLETE' fail_msg: " Unable to create Overlay Subnet with minimum requirements " success_msg: " Overlay Subnet with minimum requirements created successfully " - + - set_fact: todelete: "{{ todelete + [ result.subnet_uuid ] }}" ################################################################# @@ -310,7 +310,7 @@ register: result loop: "{{ todelete }}" ignore_errors: True - + - set_fact: todelete: [] ################################################################# @@ -334,7 +334,7 @@ domain_name: "{{ dhcp_settings.domain_name }}" tftp_server_name: "{{ dhcp_settings.tftp_server_name }}" boot_file: "{{ dhcp_settings.boot_file }}" - + register: result ignore_errors: true - name: Creation Status @@ -397,4 +397,3 @@ register: result loop: "{{ todelete }}" ignore_errors: True - diff --git a/tests/integration/targets/nutanix_subnets/tasks/delete_subnet.yml b/tests/integration/targets/nutanix_subnets/tasks/delete_subnet.yml index 3af69c07f..2f1a9e7cb 100644 --- a/tests/integration/targets/nutanix_subnets/tasks/delete_subnet.yml +++ b/tests/integration/targets/nutanix_subnets/tasks/delete_subnet.yml @@ -21,7 +21,7 @@ boot_file: "{{ dhcp_settings.boot_file }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -29,7 +29,7 @@ - result.response.status.state == 'COMPLETE' fail_msg: " Unable to create Overlay Subnet with IP_pools and DHCP " success_msg: " Overlay Subnet with IP_pools and DHCP created successfully " - + - name: Delete subnet ntnx_subnets: state: absent diff --git a/tests/integration/targets/nutanix_subnets/tasks/negative_scenarios.yml b/tests/integration/targets/nutanix_subnets/tasks/negative_scenarios.yml index 192cf5fa3..ecb702975 100644 --- a/tests/integration/targets/nutanix_subnets/tasks/negative_scenarios.yml +++ b/tests/integration/targets/nutanix_subnets/tasks/negative_scenarios.yml @@ -13,7 +13,7 @@ uuid: "{{ cluster.uuid }}" register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -37,14 +37,14 @@ gateway_ip: "{{ ip_address_management.gateway_ip_address }}" register: result ignore_errors: true - + - name: Creation Status assert: that: - result.failed==True success_msg: ' Success: returned error as expected ' ############################################################### - - name: Unknown Cluster + - name: Unknown Cluster ntnx_subnets: state: present name: VLAN subnet with IPAM and IP pools @@ -63,7 +63,7 @@ end_ip: "{{ ip_address_pools.end_address }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -76,7 +76,7 @@ subnet_uuid: 5 register: resultt ignore_errors: true - + - name: Creation Status assert: that: diff --git a/tests/integration/targets/nutanix_subnets/vars/main.yml b/tests/integration/targets/nutanix_subnets/vars/main.yml index bc7d2bd00..f7c2f6a98 100644 --- a/tests/integration/targets/nutanix_subnets/vars/main.yml +++ b/tests/integration/targets/nutanix_subnets/vars/main.yml @@ -16,7 +16,7 @@ dhcp_settings: domain_name: nutanix.com tftp_server_name: 10.5.0.10 boot_file: pxelinux.0 - + dhcp_server_address: 192.168.0.35 external_nat_subnet: vlan_id: 205 diff --git a/tests/integration/targets/nutanix_subnets_info/tasks/list_subnets.yml b/tests/integration/targets/nutanix_subnets_info/tasks/list_subnets.yml index cb7478a72..8ab34fbef 100644 --- a/tests/integration/targets/nutanix_subnets_info/tasks/list_subnets.yml +++ b/tests/integration/targets/nutanix_subnets_info/tasks/list_subnets.yml @@ -56,4 +56,4 @@ - result.response.entities[0].status.resources.vswitch_name == "br0" fail_msg: " Unable to List subnet using custom_filter " success_msg: "List subnet using custom_filter listed successfully " -######################################################### \ No newline at end of file +######################################################### diff --git a/tests/integration/targets/nutanix_vms/tasks/create.yml b/tests/integration/targets/nutanix_vms/tasks/create.yml index afe4c5d7c..9da6dfc96 100644 --- a/tests/integration/targets/nutanix_vms/tasks/create.yml +++ b/tests/integration/targets/nutanix_vms/tasks/create.yml @@ -77,7 +77,7 @@ - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' ################################################################################## - - name: VM with ubuntu image and different specifications + - name: VM with ubuntu image and different specifications ntnx_vms: state: present project: @@ -119,7 +119,7 @@ - result.response.metadata.categories_mapping["Environment"] == ["Dev"] fail_msg: 'Unable to Create VM with Ubuntu image and different specifications ' success_msg: 'VM with Ubuntu image and different specifications created successfully ' - + - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' @@ -127,7 +127,7 @@ - name: VM with CentOS-7-cloud-init image with disk image size ntnx_vms: state: present - name: VM with CentOS-7-cloud-init image + name: VM with CentOS-7-cloud-init image memory_gb: 1 timezone: "UTC" cluster: @@ -153,7 +153,7 @@ success_msg: 'VM with CentOS-7-cloud-init image created successfully ' - set_fact: - todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' + todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' ################################################################################# - name: VM with CentOS-7-cloud-init image without disk image size @@ -184,10 +184,10 @@ success_msg: 'VM with CentOS-7-cloud-init image created successfully ' - set_fact: - todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' + todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' - - name: Delete all Created VMs + - name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' @@ -220,11 +220,11 @@ - result.response.status.state == 'COMPLETE' fail_msg: 'Unable to create VM with Cluster , Network, Universal time zone, one Disk' success_msg: 'VM with Cluster , Network, Universal time zone, one Disk created successfully ' - + - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' -######################################################################################## +######################################################################################## - name: VM with Cluster, different Disks, Memory size ntnx_vms: state: present @@ -283,8 +283,8 @@ - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' - - - name: Delete all Created VMs + + - name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' @@ -317,7 +317,7 @@ - type: "CDROM" bus: "IDE" empty_cdrom: True - boot_config: + boot_config: boot_type: "UEFI" boot_order: - "DISK" @@ -327,7 +327,7 @@ cores_per_vcpu: 2 memory_gb: 1 register: result - ignore_errors: True + ignore_errors: True - name: Creation Status assert: @@ -341,7 +341,7 @@ todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' ################################################################################################## - - name: VM with managed subnet + - name: VM with managed subnet ntnx_vms: state: present name: VM with managed subnet @@ -350,11 +350,11 @@ name: "{{ cluster.name }}" networks: - is_connected: true - subnet: + subnet: uuid: "{{ network.dhcp.uuid }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -375,7 +375,7 @@ name: "{{ cluster.name }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -388,7 +388,7 @@ todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' - - name: Delete all Created VMs + - name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' @@ -410,7 +410,7 @@ subnet: uuid: "{{ static.uuid }}" private_ip: "{{ network.static.ip }}" - boot_config: + boot_config: boot_type: LEGACY boot_order: - DISK @@ -421,7 +421,7 @@ memory_gb: 1 register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -434,7 +434,7 @@ todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' - - name: Delete all Created VM + - name: Delete all Created VM ntnx_vms: state: absent vm_uuid: '{{ item }}' @@ -474,7 +474,7 @@ - type: CDROM bus: IDE empty_cdrom: True - boot_config: + boot_config: boot_type: UEFI boot_order: - DISK @@ -485,7 +485,7 @@ memory_gb: 1 register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -493,7 +493,7 @@ - result.response.status.state == 'COMPLETE' fail_msg: ' Unable to create VM with managed and unmanaged network ' success_msg: ' VM with managed and unmanaged network created successfully ' - + - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' @@ -501,7 +501,7 @@ - name: VM with diffrent disk types and diffrent sizes with UEFI boot type ntnx_vms: state: present - name: VM with UEFI boot type + name: VM with UEFI boot type timezone: GMT cluster: name: "{{ cluster.name }}" @@ -510,7 +510,7 @@ - Apache_Spark disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 20 @@ -527,7 +527,7 @@ - type: DISK size_gb: 3 bus: SATA - boot_config: + boot_config: boot_type: UEFI boot_order: - DISK @@ -548,22 +548,22 @@ - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' - when: result.response.status.state == 'COMPLETE' + when: result.response.status.state == 'COMPLETE' - - name: Delete all Created VM + - name: Delete all Created VM ntnx_vms: state: absent vm_uuid: '{{ item }}' register: result loop: '{{ todelete }}' - + - set_fact: todelete: [] #################################################################################### - name: VM with storage container ntnx_vms: state: present - name: VM with UEFI boot type + name: VM with UEFI boot type timezone: GMT cluster: name: "{{ cluster.name }}" @@ -580,7 +580,7 @@ cores_per_vcpu: 1 memory_gb: 1 register: result - + - name: Creation Status assert: that: @@ -591,9 +591,9 @@ - set_fact: todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' - when: result.response.status.state == 'COMPLETE' + when: result.response.status.state == 'COMPLETE' #################################################################################### - - name: Delete all Created VMs + - name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' diff --git a/tests/integration/targets/nutanix_vms/tasks/delete.yml b/tests/integration/targets/nutanix_vms/tasks/delete.yml index 527171727..b1cf3046d 100644 --- a/tests/integration/targets/nutanix_vms/tasks/delete.yml +++ b/tests/integration/targets/nutanix_vms/tasks/delete.yml @@ -7,7 +7,7 @@ name: "{{ cluster.name }}" register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -15,7 +15,7 @@ - result.response.status.state == 'COMPLETE' fail_msg: ' Unable to create VM with minimum requiremnts ' success_msg: ' VM with minimum requiremnts created successfully ' - + - name: Delete VM ntnx_vms: vm_uuid: '{{ result["response"]["metadata"]["uuid"] }}' diff --git a/tests/integration/targets/nutanix_vms/tasks/negtaive_vm_update.yml b/tests/integration/targets/nutanix_vms/tasks/negtaive_vm_update.yml index 3d8a1b55b..a17b52529 100644 --- a/tests/integration/targets/nutanix_vms/tasks/negtaive_vm_update.yml +++ b/tests/integration/targets/nutanix_vms/tasks/negtaive_vm_update.yml @@ -5,11 +5,11 @@ cluster: name: "{{ cluster.name }}" vcpus: 4 - cores_per_vcpu: 4 + cores_per_vcpu: 4 memory_gb: 4 disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 25 @@ -50,7 +50,7 @@ ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" vcpus: 4 - cores_per_vcpu: 4 + cores_per_vcpu: 4 memory_gb: 4 register: result ignore_errors: true @@ -216,7 +216,7 @@ uuid: "{{ vm.response.spec.resources.disk_list[5].uuid }}" # scsi size_gb: 1 register: result - ignore_errors: true + ignore_errors: true - name: Creation Status assert: @@ -233,7 +233,7 @@ uuid: "{{ vm.response.spec.resources.disk_list[6].uuid }}" # IDE size_gb: 1 register: result - ignore_errors: true + ignore_errors: true - name: Creation Status assert: @@ -241,7 +241,7 @@ - result.msg == ' Unsupported operation: Unable to decrease disk size.' fail_msg: ' Fail: decreasing the size of the IDE disk' success_msg: ' Success: returned error as expected ' -################ +################ - name: Update VM by change ths bus type of ide disk ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" @@ -298,7 +298,7 @@ fail_msg: 'Fail : update vm by add SATA disk while vm is on ' success_msg: ' Success: returned error as expected ' ############# -- name: Update VM by removing IDE disks while vm is on +- name: Update VM by removing IDE disks while vm is on ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" disks: @@ -315,7 +315,7 @@ fail_msg: 'Fail : update vm by by removing IDE disks while vm is on ' success_msg: ' Success: returned error as expected ' -- name: Update VM by removing IDE disks while vm is on +- name: Update VM by removing IDE disks while vm is on ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" disks: @@ -333,7 +333,7 @@ fail_msg: 'Fail : update vm by by removing IDE disks while vm is on ' success_msg: ' Success: returned error as expected ' -- name: Update VM by removing PCI disks while vm is on +- name: Update VM by removing PCI disks while vm is on ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" disks: @@ -351,7 +351,7 @@ fail_msg: 'Fail : update vm by by removing PCI disks while vm is on ' success_msg: ' Success: returned error as expected ' -- name: Update VM by removing SATA disks while vm is on +- name: Update VM by removing SATA disks while vm is on ntnx_vms: vm_uuid: "{{ vm.vm_uuid }}" disks: diff --git a/tests/integration/targets/nutanix_vms/tasks/vm_operations.yml b/tests/integration/targets/nutanix_vms/tasks/vm_operations.yml index a1f5e8177..d64f9f755 100644 --- a/tests/integration/targets/nutanix_vms/tasks/vm_operations.yml +++ b/tests/integration/targets/nutanix_vms/tasks/vm_operations.yml @@ -11,13 +11,13 @@ name: "{{ cluster.name }}" disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 20 register: vm ignore_errors: true - + - name: Creation Status assert: that: @@ -35,7 +35,7 @@ name: "{{ cluster.name }}" disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 20 @@ -116,7 +116,7 @@ # success_msg: ' VM soft_shutdown successfully ' ########################################### ############################### -# - name: VM with minimum requiremnts and soft_shutdown +# - name: VM with minimum requiremnts and soft_shutdown # ntnx_vms: # state: present # name: integration_test_opperations_vm @@ -125,7 +125,7 @@ # name: "{{ cluster.name }}" # disks: # - type: "DISK" -# clone_image: +# clone_image: # name: "{{ centos }}" # bus: "SCSI" # size_gb: 20 @@ -176,7 +176,7 @@ wait: false register: result ignore_errors: true - + - name: Creation Status assert: that: @@ -191,13 +191,13 @@ todelete: '{{ todelete + [ result["response"]["metadata"]["uuid"] ] }}' when: result.response.status.state == 'COMPLETE' -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' loop: '{{ todelete }}' -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ vm.vm_uuid }}' diff --git a/tests/integration/targets/nutanix_vms/tasks/vm_update.yml b/tests/integration/targets/nutanix_vms/tasks/vm_update.yml index 8ce3b8bc7..fa0ccd60e 100644 --- a/tests/integration/targets/nutanix_vms/tasks/vm_update.yml +++ b/tests/integration/targets/nutanix_vms/tasks/vm_update.yml @@ -10,7 +10,7 @@ Environment: - Production vcpus: 5 - cores_per_vcpu: 5 + cores_per_vcpu: 5 memory_gb: 5 timezone: GMT register: result @@ -49,7 +49,7 @@ #################################################################### - debug: - msg: Start update tests for memory vcpus cores_per_vcpu + msg: Start update tests for memory vcpus cores_per_vcpu - name: decrease values for memory, vcpus and corespervcpu with force_power_off ntnx_vms: @@ -162,7 +162,7 @@ vm_uuid: "{{ result.vm_uuid }}" disks: - type: "DISK" - clone_image: + clone_image: name: "{{ ubuntu }}" bus: "SCSI" size_gb: 20 @@ -246,7 +246,7 @@ bus: PCI register: result ignore_errors: true - + - name: Update Status assert: that: @@ -523,7 +523,7 @@ - result.vm_uuid - result.task_uuid fail_msg: ' Unable to update vm by editing a subnet vlan ' - success_msg: ' VM updated successfully by editing a subnet vlan ' + success_msg: ' VM updated successfully by editing a subnet vlan ' - name: Update VM by deleting a subnet ntnx_vms: @@ -544,7 +544,7 @@ - result.vm_uuid - result.task_uuid fail_msg: ' Unable to update vm by deleting a subnet ' - success_msg: ' VM updated successfully by deleting a subnet ' + success_msg: ' VM updated successfully by deleting a subnet ' # #################################################################### - name: Update VM by deleting it @@ -561,4 +561,4 @@ - result.vm_uuid - result.task_uuid fail_msg: 'Fail: Unable to delete created vm ' - success_msg: 'Success: Vm deleted sucessfully' + success_msg: 'Success: Vm deleted sucessfully' diff --git a/tests/integration/targets/nutanix_vms_info/tasks/list_vms.yml b/tests/integration/targets/nutanix_vms_info/tasks/list_vms.yml index 991d25733..93b21f003 100644 --- a/tests/integration/targets/nutanix_vms_info/tasks/list_vms.yml +++ b/tests/integration/targets/nutanix_vms_info/tasks/list_vms.yml @@ -1,7 +1,7 @@ - set_fact: todelete: [] -- name: Creat anohter VM with same name +- name: Creat anohter VM with same name ntnx_vms: name: "{{ vm.name }}" cluster: @@ -9,7 +9,7 @@ state: "power_off" register: output ignore_errors: true - + - name: Creation Status assert: that: @@ -37,7 +37,7 @@ - result.response.metadata.total_matches == 1 fail_msg: " Unable to list vms using filter_string" success_msg: " VMs listed successfully using filter_string " -################################################## +################################################## - name: List vms using name filter criteria ntnx_vms_info: filter: @@ -53,7 +53,7 @@ - result.response is defined fail_msg: " Unable to list vms " success_msg: " VMs listed successfully " -################################################## +################################################## - name: List vms using length and offset ntnx_vms_info: length: 10 @@ -84,11 +84,11 @@ fail_msg: " Unable to list vms " success_msg: " VMs listed successfully " #################################################### -- name: Delete all Created VMs +- name: Delete all Created VMs ntnx_vms: state: absent vm_uuid: '{{ item }}' register: result loop: '{{ todelete }}' - set_fact: - todelete: [] \ No newline at end of file + todelete: [] diff --git a/tests/integration/targets/nutanix_vpcs/tasks/negative_scenarios.yml b/tests/integration/targets/nutanix_vpcs/tasks/negative_scenarios.yml index 10224d730..9f40bbf94 100644 --- a/tests/integration/targets/nutanix_vpcs/tasks/negative_scenarios.yml +++ b/tests/integration/targets/nutanix_vpcs/tasks/negative_scenarios.yml @@ -1,6 +1,6 @@ - debug: msg: "Started Negative Creation Cases" - + - name: Unknown subnet name ntnx_vpcs: state: present @@ -44,7 +44,7 @@ network_prefix: 24 register: result ignore_errors: True - + - name: Creation Status assert: that: @@ -77,4 +77,4 @@ that: - result.failed==True success_msg: ' Success: returned error as expected ' - fail_msg: ' Fail deleting vpc with missing uuid ' \ No newline at end of file + fail_msg: ' Fail deleting vpc with missing uuid ' diff --git a/tests/integration/targets/prepare_env/tasks/cleanup.yml b/tests/integration/targets/prepare_env/tasks/cleanup.yml index 9a2ceb7ac..9c6365254 100644 --- a/tests/integration/targets/prepare_env/tasks/cleanup.yml +++ b/tests/integration/targets/prepare_env/tasks/cleanup.yml @@ -62,4 +62,4 @@ ignore_errors: true file: path: "{{ disk_image.dest }}" - state: absent \ No newline at end of file + state: absent diff --git a/tests/integration/targets/prepare_env/tasks/prepare_env.yml b/tests/integration/targets/prepare_env/tasks/prepare_env.yml index 55f1e4fca..b376483d4 100644 --- a/tests/integration/targets/prepare_env/tasks/prepare_env.yml +++ b/tests/integration/targets/prepare_env/tasks/prepare_env.yml @@ -4,13 +4,13 @@ gather_facts: false collections: - nutanix.ncp - + tasks: - name: include var file include_vars: ../vars/main.yml - set_fact: - ip: "{{lookup('env', 'NUTANIX_HOST') }}" - username: "{{lookup('env', 'NUTANIX_USERNAME') }}" + ip: "{{lookup('env', 'NUTANIX_HOST') }}" + username: "{{lookup('env', 'NUTANIX_USERNAME') }}" password: "{{lookup('env', 'NUTANIX_PASSWORD') }}" recovery_site_ip: "{{lookup('env', 'NUTANIX_DR_SITE')}}" validate_certs: false @@ -19,10 +19,10 @@ path: ../vars/main.yml marker: "# {mark} ANSIBLE MANAGED BLOCK insertion 0" block: | - ip: "{{lookup('env', 'NUTANIX_HOST') }}" - username: "{{lookup('env', 'NUTANIX_USERNAME') }}" + ip: "{{lookup('env', 'NUTANIX_HOST') }}" + username: "{{lookup('env', 'NUTANIX_USERNAME') }}" password: "{{lookup('env', 'NUTANIX_PASSWORD') }}" - recovery_site_ip: "{{lookup('env', 'NUTANIX_DR_SITE') }}" + recovery_site_ip: "{{lookup('env', 'NUTANIX_DR_SITE') }}" validate_certs: false - name: create external subnet with NAT ntnx_subnets: @@ -152,7 +152,7 @@ uuid: "{{ cluster.uuid }}" networks: - is_connected: true - subnet: + subnet: name: "{{overlay_subnet.name}}" private_ip: "{{overlay_subnet.private_ip}}" register: result @@ -182,7 +182,7 @@ # # uuid: "{{ cluster.uuid }}" # # networks: # # - is_connected: true -# # subnet: +# # subnet: # # name: "{{static_subnet_name}}" # # vcpus: 1 # # cores_per_vcpu: 1 @@ -211,4 +211,4 @@ # subnets: # - network_ip: "10.1.1.0" # network_prefix: 24 - # ignore_errors: true \ No newline at end of file + # ignore_errors: true diff --git a/tests/integration/targets/prepare_fc_env/tasks/prepare_fc_env.yml b/tests/integration/targets/prepare_fc_env/tasks/prepare_fc_env.yml index 92a3643bd..8471e662b 100644 --- a/tests/integration/targets/prepare_fc_env/tasks/prepare_fc_env.yml +++ b/tests/integration/targets/prepare_fc_env/tasks/prepare_fc_env.yml @@ -4,7 +4,7 @@ gather_facts: false collections: - nutanix.ncp - + tasks: - name: include var file include_vars: ../vars/main.yml diff --git a/tests/integration/targets/prepare_foundation_env/tasks/cleanup.yml b/tests/integration/targets/prepare_foundation_env/tasks/cleanup.yml index bc4abe367..e36708ac0 100644 --- a/tests/integration/targets/prepare_foundation_env/tasks/cleanup.yml +++ b/tests/integration/targets/prepare_foundation_env/tasks/cleanup.yml @@ -9,4 +9,4 @@ # file: # path: "{{ source }}" # state: absent - # ignore_errors: true \ No newline at end of file + # ignore_errors: true diff --git a/tests/integration/targets/prepare_foundation_env/tasks/prepare_foundation_env.yml b/tests/integration/targets/prepare_foundation_env/tasks/prepare_foundation_env.yml index 44ec711aa..8471e662b 100644 --- a/tests/integration/targets/prepare_foundation_env/tasks/prepare_foundation_env.yml +++ b/tests/integration/targets/prepare_foundation_env/tasks/prepare_foundation_env.yml @@ -4,7 +4,7 @@ gather_facts: false collections: - nutanix.ncp - + tasks: - name: include var file - include_vars: ../vars/main.yml \ No newline at end of file + include_vars: ../vars/main.yml diff --git a/tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml b/tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml index 70debb3c5..cc9445779 100644 --- a/tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml +++ b/tests/integration/targets/prepare_ndb_env/tasks/prepare_env.yml @@ -4,20 +4,19 @@ gather_facts: false collections: - nutanix.ncp - + tasks: - name: include var file include_vars: ../vars/main.yml - set_fact: - ndb_ip: "{{lookup('env', 'NDB_HOST') }}" - ndb_username: "{{lookup('env', 'NDB_USERNAME') }}" + ndb_ip: "{{lookup('env', 'NDB_HOST') }}" + ndb_username: "{{lookup('env', 'NDB_USERNAME') }}" ndb_password: "{{lookup('env', 'NDB_PASSWORD') }}" - name: Insert credentials block to vars blockinfile: path: ../vars/main.yml marker: "# {mark} ANSIBLE MANAGED BLOCK insertion 0" block: | - ndb_ip: "{{lookup('env', 'NDB_HOST') }}" - ndb_username: "{{lookup('env', 'NDB_USERNAME') }}" + ndb_ip: "{{lookup('env', 'NDB_HOST') }}" + ndb_username: "{{lookup('env', 'NDB_USERNAME') }}" ndb_password: "{{lookup('env', 'NDB_PASSWORD') }}" - \ No newline at end of file From e1cd8971e0dc44218c0a0ff0ff5ea56ea24bf35a Mon Sep 17 00:00:00 2001 From: Pradeepsingh Bhati Date: Sat, 16 Mar 2024 01:18:41 +0530 Subject: [PATCH 38/38] Change log changes --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61def8c5e..680b0e1d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ - ntnx_vms_clone - [Bug] cannot change boot_config when cloning in module ntnx_vms_clone [[\#360](https://github.com/nutanix/nutanix.ansible/issues/359)] - website - [Bug] Github page deployment action is failing. [[\#483](https://github.com/nutanix/nutanix.ansible/issues/483)] +**Breaking Changes:** + +- nutanix.ncp collection - Due to all versions of ansible-core less than v2.14.0 are EOL, we are also deprecating support for same and minimum version to use this collection is ansible-core==2.14.0 + **Full Changelog:** [here](https://github.com/nutanix/nutanix.ansible/compare/v1.9.0...v1.9.1) ## v1.9.0 (11 July 2023) @@ -190,7 +194,7 @@ **Prism Central** - Ansible module for Image Management - Ansible info module for Image Management -- Ansible module for Image Placement Policy +- Ansible module for Image Placement Policy - Ansible info module for Image Placement Policies - Ansible module for Network Security Rules - Ansible info module for Network Security Rules