diff --git a/tests/integration/targets/anti_ddos_fip_statuses_info/tasks/main.yaml b/tests/integration/targets/anti_ddos_fip_statuses_info/tasks/main.yaml index 12a80345..7e1e7361 100644 --- a/tests/integration/targets/anti_ddos_fip_statuses_info/tasks/main.yaml +++ b/tests/integration/targets/anti_ddos_fip_statuses_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.anti_ddos_fip_statuses_info: register: anti_ddos - - name: assert result + - name: Assert result ansible.builtin.assert: that: - anti_ddos is success @@ -19,7 +19,7 @@ status: "notConfig" register: anti_ddos - - name: assert result + - name: Assert result ansible.builtin.assert: that: - anti_ddos is success @@ -31,7 +31,7 @@ register: anti_ddos ignore_errors: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - anti_ddos is not success diff --git a/tests/integration/targets/anti_ddos_optional_policies_info/tasks/main.yaml b/tests/integration/targets/anti_ddos_optional_policies_info/tasks/main.yaml index d94d90f2..7532116a 100644 --- a/tests/integration/targets/anti_ddos_optional_policies_info/tasks/main.yaml +++ b/tests/integration/targets/anti_ddos_optional_policies_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.anti_ddos_optional_policies_info: register: anti_ddos_optional_policies_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - anti_ddos_optional_policies_info is success diff --git a/tests/integration/targets/as_config/tasks/main.yaml b/tests/integration/targets/as_config/tasks/main.yaml index 3c3eb5fa..6a3a67fb 100644 --- a/tests/integration/targets/as_config/tasks/main.yaml +++ b/tests/integration/targets/as_config/tasks/main.yaml @@ -30,7 +30,7 @@ register: as_config_check check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_config_check is changed @@ -47,7 +47,7 @@ disk_type: 'SYS' register: as_config - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_config is changed @@ -60,16 +60,22 @@ opentelekomcloud.cloud.as_config: scaling_configuration: "{{ config_name }}" state: absent - register: dropped_as_config + register: removed + until: removed is not failed ignore_errors: true + retries: 10 - - name: assert result + - name: Assert result ansible.builtin.assert: that: - - dropped_as_config is success - - dropped_as_config is changed + - removed is success + - removed is changed - name: Delete keypair openstack.cloud.keypair: name: "{{ key_name }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/as_config_info/tasks/main.yaml b/tests/integration/targets/as_config_info/tasks/main.yaml index 3a24577e..c7979357 100644 --- a/tests/integration/targets/as_config_info/tasks/main.yaml +++ b/tests/integration/targets/as_config_info/tasks/main.yaml @@ -6,11 +6,11 @@ cloud: "{{ test_cloud }}" register: auto_scale - - name: debug configs + - name: Debug configs ansible.builtin.debug: var: auto_scale.as_configs - - name: assert result + - name: Assert result ansible.builtin.assert: that: - auto_scale is success diff --git a/tests/integration/targets/as_group/tasks/main.yaml b/tests/integration/targets/as_group/tasks/main.yaml index aa39921b..06a7c3bc 100644 --- a/tests/integration/targets/as_group/tasks/main.yaml +++ b/tests/integration/targets/as_group/tasks/main.yaml @@ -81,7 +81,7 @@ check_mode: true register: as_group_check - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group_check is changed @@ -94,7 +94,7 @@ router: "{{ router.router.id }}" register: as_group - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group is success @@ -119,7 +119,7 @@ check_mode: true register: as_group_check - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group_check is success @@ -133,7 +133,7 @@ max_instance_number: 10 register: as_group - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group is success @@ -148,7 +148,7 @@ check_mode: true register: as_group_check - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group_check is changed @@ -163,7 +163,7 @@ timeout: 360 register: as_gr_del - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_gr_del is success @@ -195,7 +195,7 @@ timeout: 360 register: as_group - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_group is success @@ -206,7 +206,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -235,36 +235,52 @@ force_delete: true wait: true timeout: 360 - register: dropped_as_group - failed_when: "dropped_as_group is not changed" + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete as config opentelekomcloud.cloud.as_config: scaling_configuration: "{{ config_name }}" state: absent - register: dropped_as_config - failed_when: "dropped_as_config is not changed" + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete keypair openstack.cloud.keypair: name: "{{ key_name }}" state: absent - failed_when: false - - - name: Drop existing router - openstack.cloud.router: - name: "{{ router.router.name }}" - state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet.subnet.name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network.network.name }}" state: absent - ignore_errors: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 + + - name: Drop existing router + openstack.cloud.router: + name: "{{ router.router.name }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/as_instance/tasks/main.yaml b/tests/integration/targets/as_instance/tasks/main.yaml index cf765903..7bc82d55 100644 --- a/tests/integration/targets/as_instance/tasks/main.yaml +++ b/tests/integration/targets/as_instance/tasks/main.yaml @@ -158,7 +158,7 @@ ansible.builtin.set_fact: init_name_list: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - init_id_list|length == desire_instance_number @@ -173,7 +173,7 @@ check_mode: true register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -192,7 +192,7 @@ ansible.builtin.set_fact: init_name_list: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - init_id_list|length == desire_instance_number @@ -211,7 +211,7 @@ ansible.builtin.set_fact: name_list: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - id_list|length == init_id_list|length @@ -225,7 +225,7 @@ state: present register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -244,7 +244,7 @@ ansible.builtin.set_fact: name_list: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - id_list|length == init_id_list|length + 2 @@ -259,7 +259,7 @@ check_mode: true register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -273,7 +273,7 @@ state: present register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -288,7 +288,7 @@ check_mode: true register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -302,7 +302,7 @@ state: present register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -317,7 +317,7 @@ check_mode: true register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -336,7 +336,7 @@ ansible.builtin.set_fact: name_list_2: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - id_list_2|length == id_list|length @@ -352,7 +352,7 @@ timeout: 360 register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -371,7 +371,7 @@ ansible.builtin.set_fact: name_list_after_remove: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - id_list_after_remove|length == id_list|length - 1 @@ -387,7 +387,7 @@ check_mode: true register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -406,7 +406,7 @@ ansible.builtin.set_fact: name_list_after_remove: "{{ as_inst_list.scaling_instances | map(attribute='name') | list }}" - - name: assert result + - name: Assert result ansible.builtin.assert: that: - id_list_after_remove|length == id_list|length - 1 @@ -423,7 +423,7 @@ timeout: 360 register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -434,7 +434,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result.scaling_instances|length == {{ min_instance_number }} @@ -447,7 +447,6 @@ name: "{{ (as_instance_name + '_1') }}" delete_fip: true state: absent - failed_when: false - name: Delete ECS2 openstack.cloud.server: @@ -464,9 +463,8 @@ wait: true timeout: 360 register: dropped_as_group - failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped_as_group is success @@ -477,9 +475,8 @@ scaling_configuration: "{{ as_config_name }}" state: absent register: dropped_as_config - failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped_as_config is success @@ -489,28 +486,23 @@ openstack.cloud.security_group: name: "{{ secgroup_name }}" state: absent - failed_when: false - name: Delete existing router openstack.cloud.router: name: "{{ router.router.name }}" state: absent - failed_when: false - name: Delete existing subnet openstack.cloud.subnet: name: "{{ subnet.subnet.name }}" state: absent - failed_when: false - name: Delete existing network openstack.cloud.network: name: "{{ network.network.name }}" state: absent - failed_when: false - name: Delete keypair openstack.cloud.keypair: name: "{{ kp_name }}" state: absent - failed_when: false diff --git a/tests/integration/targets/as_instance_info/tasks/main.yaml b/tests/integration/targets/as_instance_info/tasks/main.yaml index 5e779697..0ac83b70 100644 --- a/tests/integration/targets/as_instance_info/tasks/main.yaml +++ b/tests/integration/targets/as_instance_info/tasks/main.yaml @@ -62,7 +62,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success @@ -74,7 +74,7 @@ scaling_group: "{{ as_group.as_group.name }}" register: as_instances - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_instances is success diff --git a/tests/integration/targets/as_policy/tasks/main.yaml b/tests/integration/targets/as_policy/tasks/main.yaml index e4f2d9cd..6f532a1f 100644 --- a/tests/integration/targets/as_policy/tasks/main.yaml +++ b/tests/integration/targets/as_policy/tasks/main.yaml @@ -106,7 +106,7 @@ check_mode: true register: as_policy - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policy is changed @@ -120,7 +120,7 @@ state: "present" register: as_policy - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policy is success @@ -142,7 +142,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: as_policies - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policies is success @@ -160,7 +160,7 @@ instance_number: 1 register: as_policy - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policy is success @@ -175,7 +175,7 @@ register: as_policy check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policy is changed @@ -187,7 +187,7 @@ state: "absent" register: as_policy - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policy is success @@ -199,7 +199,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: as_policies - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policies is success @@ -223,36 +223,53 @@ state: absent force_delete: true wait: true - register: dropped_as_group - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop alarm opentelekomcloud.cloud.ces_alarms: alarm_name: "{{ alarm_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop floating ip opentelekomcloud.cloud.floating_ip: floating_ip_address: "{{ fl_ip }}" state: absent purge: true - failed_when: false - - - name: Drop existing router - openstack.cloud.router: - name: "{{ router.router.name }}" - state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet.subnet.name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network.network.name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 + + - name: Drop existing router + openstack.cloud.router: + name: "{{ router.router.name }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/as_policy_info/tasks/main.yaml b/tests/integration/targets/as_policy_info/tasks/main.yaml index 81625f0f..e4ae9db1 100644 --- a/tests/integration/targets/as_policy_info/tasks/main.yaml +++ b/tests/integration/targets/as_policy_info/tasks/main.yaml @@ -69,7 +69,7 @@ scaling_group: "{{ as_group.as_group.id }}" register: as_policies - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policies is success @@ -81,7 +81,7 @@ scaling_group: "{{ as_group.as_group.name }}" register: as_policies - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_policies is success diff --git a/tests/integration/targets/as_quota_info/tasks/main.yaml b/tests/integration/targets/as_quota_info/tasks/main.yaml index cca8f9d9..a3e35d87 100644 --- a/tests/integration/targets/as_quota_info/tasks/main.yaml +++ b/tests/integration/targets/as_quota_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.as_quota_info: register: as_quotas - - name: assert result + - name: Assert result ansible.builtin.assert: that: - as_quotas is success diff --git a/tests/integration/targets/availability_zone_info/tasks/main.yaml b/tests/integration/targets/availability_zone_info/tasks/main.yaml index 03841ca2..09bd0bc0 100644 --- a/tests/integration/targets/availability_zone_info/tasks/main.yaml +++ b/tests/integration/targets/availability_zone_info/tasks/main.yaml @@ -13,7 +13,7 @@ opentelekomcloud.cloud.availability_zone_info: register: az - - name: assert result + - name: Assert result ansible.builtin.assert: that: - az is success diff --git a/tests/integration/targets/cbr/tasks/main.yaml b/tests/integration/targets/cbr/tasks/main.yaml index fe2491fc..8e557aab 100644 --- a/tests/integration/targets/cbr/tasks/main.yaml +++ b/tests/integration/targets/cbr/tasks/main.yaml @@ -44,7 +44,7 @@ resources: [{"id": '{{ vol1.volume.id }}', "type":"OS::Cinder::Volume"}] register: created_vault - - name: assert result + - name: Assert result ansible.builtin.assert: that: - created_vault is success @@ -57,7 +57,7 @@ action: "associate_resources" register: vault - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vault is success @@ -70,7 +70,7 @@ action: "dissociate_resources" register: vault - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vault is success @@ -81,7 +81,7 @@ vault: "{{ vault.vault.id }}" register: checkpoint - - name: assert result + - name: Assert result ansible.builtin.assert: that: - checkpoint is success @@ -92,7 +92,7 @@ vault: "{{ vault.vault.id }}" register: backups_list - - name: assert result + - name: Assert result ansible.builtin.assert: that: - backups_list is success @@ -103,7 +103,7 @@ name: "{{ backups_list.backups[0].id }}" register: backup - - name: assert result + - name: Assert result ansible.builtin.assert: that: - backup is success @@ -115,7 +115,7 @@ volume_id: "{{ vol1.volume.id }}" register: restore_backup - - name: assert result + - name: Assert result ansible.builtin.assert: that: - restore_backup is success @@ -129,7 +129,7 @@ timeout: 600 register: delete_backup - - name: assert result + - name: Assert result ansible.builtin.assert: that: - delete_backup is success @@ -142,20 +142,25 @@ opentelekomcloud.cloud.cbr_vault: name: "{{ (vault_name) }}" state: absent - register: vault - - - name: assert result - ansible.builtin.assert: - that: - - vault is success - - vault is changed + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete first volume openstack.cloud.volume: display_name: "{{ volume_name1 }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete second volume openstack.cloud.volume: display_name: "{{ volume_name1 }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/cce_cluster/tasks/main.yaml b/tests/integration/targets/cce_cluster/tasks/main.yaml index 91ac5485..721c66cf 100644 --- a/tests/integration/targets/cce_cluster/tasks/main.yaml +++ b/tests/integration/targets/cce_cluster/tasks/main.yaml @@ -58,7 +58,7 @@ container_network_mode: "{{ container_network_mode }}" register: cluster - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cluster is success @@ -71,25 +71,37 @@ opentelekomcloud.cloud.cce_cluster: name: "{{ cce_cluster_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: cloud: "{{ test_cloud }}" name: "{{ router_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: cloud: "{{ test_cloud }}" name: "{{ subnet_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: cloud: "{{ test_cloud }}" name: "{{ network_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/cce_cluster_node/tasks/main.yaml b/tests/integration/targets/cce_cluster_node/tasks/main.yaml index fc0b63d4..bba71834 100644 --- a/tests/integration/targets/cce_cluster_node/tasks/main.yaml +++ b/tests/integration/targets/cce_cluster_node/tasks/main.yaml @@ -68,7 +68,7 @@ wait: true register: cluster - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cluster is success @@ -80,7 +80,7 @@ name: "{{ keypair_name }}" register: ssh_key - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ssh_key is success @@ -121,7 +121,7 @@ state: present register: node - - name: assert result + - name: Assert result ansible.builtin.assert: that: - node is success @@ -135,34 +135,52 @@ cluster: "{{ cce_cluster_name }}" name: "{{ cce_node_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop keypair openstack.cloud.keypair: name: "{{ keypair_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop cluster opentelekomcloud.cloud.cce_cluster: name: "{{ cce_cluster_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: name: "{{ router_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: name: "{{ subnet_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: name: "{{ network_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/cce_lifecycle/tasks/main.yaml b/tests/integration/targets/cce_lifecycle/tasks/main.yaml index 2c9d9e01..a72cb23d 100644 --- a/tests/integration/targets/cce_lifecycle/tasks/main.yaml +++ b/tests/integration/targets/cce_lifecycle/tasks/main.yaml @@ -68,7 +68,7 @@ container_network_mode: "{{ container_network_mode }}" register: cluster - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cluster is success @@ -79,7 +79,7 @@ opentelekomcloud.cloud.cce_cluster_info: register: cluster_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cluster_info is success @@ -91,7 +91,7 @@ name: "{{ keypair_name }}" register: keypair - - name: assert result + - name: Assert result ansible.builtin.assert: that: - keypair is success @@ -131,13 +131,13 @@ state: present register: node - - name: assert result + - name: Assert result ansible.builtin.assert: that: - node is success - node is changed - - name: assert result + - name: Assert result ansible.builtin.assert: that: - node is success @@ -158,7 +158,7 @@ wait: true register: node2 - - name: assert result + - name: Assert result ansible.builtin.assert: that: - node2 is success @@ -169,7 +169,7 @@ cce_cluster: "{{ cce_cluster_name }}" register: node_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - node_info is success @@ -184,39 +184,56 @@ name: "{{ cce_node_name2 }}" state: absent wait: true - register: node2 - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop cluster opentelekomcloud.cloud.cce_cluster: name: "{{ cce_cluster_name }}" timeout: 3000 state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop Keypair openstack.cloud.keypair: state: "absent" name: "{{ keypair_name }}" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: cloud: "{{ test_cloud }}" name: "{{ router_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: cloud: "{{ test_cloud }}" name: "{{ subnet_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: cloud: "{{ test_cloud }}" name: "{{ network_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/cce_node_pool/tasks/main.yaml b/tests/integration/targets/cce_node_pool/tasks/main.yaml index f6dc610c..2b98fa8f 100644 --- a/tests/integration/targets/cce_node_pool/tasks/main.yaml +++ b/tests/integration/targets/cce_node_pool/tasks/main.yaml @@ -2,7 +2,7 @@ - name: CCE Node Pool tests block: - name: Create Node Pool - cce_node_pool: + opentelekomcloud.cloud.cce_node_pool: cloud: "{{ test_cloud }}" availability_zone: "random" autoscaling_enabled: true @@ -42,11 +42,11 @@ state: present register: pool - - name: debug pool + - name: Debug pool ansible.builtin.debug: var: pool.cce_node_pool - - name: assert result + - name: Assert result ansible.builtin.assert: that: - pool.cce_node_pool is defined diff --git a/tests/integration/targets/cce_node_pool_info/tasks/main.yaml b/tests/integration/targets/cce_node_pool_info/tasks/main.yaml index e4a00131..249e4859 100644 --- a/tests/integration/targets/cce_node_pool_info/tasks/main.yaml +++ b/tests/integration/targets/cce_node_pool_info/tasks/main.yaml @@ -2,16 +2,16 @@ - name: CCE Node Pool Info tests block: - name: Get all Node Pools of a cluster - cce_node_pool_info: + opentelekomcloud.cloud.cce_node_pool_info: cloud: "{{ test_cloud }}" cce_cluster: test-cluster register: pools - - name: debug pools + - name: Debug pools ansible.builtin.debug: var: pools.cce_node_pools - - name: assert result + - name: Assert result ansible.builtin.assert: that: - pools is success diff --git a/tests/integration/targets/ces/tasks/main.yaml b/tests/integration/targets/ces/tasks/main.yaml index 71a9380f..0fcf2e8d 100644 --- a/tests/integration/targets/ces/tasks/main.yaml +++ b/tests/integration/targets/ces/tasks/main.yaml @@ -10,7 +10,7 @@ network: admin_external_net register: fl - - name: debug + - name: Debug ansible.builtin.debug: var: fl.floating_ip @@ -42,7 +42,7 @@ check_mode: true register: ces_al_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_al_ch is success @@ -69,11 +69,11 @@ alarm_action_enabled: false register: ces_al - - name: debug + - name: Debug ansible.builtin.debug: var: ces_al.alarms - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_al is success @@ -84,11 +84,11 @@ name: "{{ alarm_name }}" register: ces_al_info - - name: debug + - name: Debug ansible.builtin.debug: var: ces_al_info.alarms - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_al_info is success @@ -103,11 +103,11 @@ time_to: "1605523441322" register: ces_ed_info - - name: debug + - name: Debug ansible.builtin.debug: var: ces_ed_info.events - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_ed_info is success @@ -124,11 +124,11 @@ dim0: "{{ ( 'publicip_id,' + fl_ip_id ) }}" register: ces_md_info - - name: debug + - name: Debug ansible.builtin.debug: var: ces_md_info.metricdata - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_al_info is success @@ -139,11 +139,11 @@ order: asc register: ces_me_info - - name: debug + - name: Debug ansible.builtin.debug: var: ces_me_info.metrics - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_me_info is success @@ -153,11 +153,11 @@ opentelekomcloud.cloud.ces_quotas_info: register: ces_qu_info - - name: debug + - name: Debug ansible.builtin.debug: var: ces_qu_info.quotas - - name: assert result + - name: Assert result ansible.builtin.assert: that: - ces_qu_info is success diff --git a/tests/integration/targets/css_cluster/tasks/main.yaml b/tests/integration/targets/css_cluster/tasks/main.yaml index dfe900d5..474aaf85 100644 --- a/tests/integration/targets/css_cluster/tasks/main.yaml +++ b/tests/integration/targets/css_cluster/tasks/main.yaml @@ -81,7 +81,7 @@ system_encrypted: 0 register: cluster - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cluster is success @@ -94,32 +94,47 @@ opentelekomcloud.cloud.css_cluster: name: "{{ css_cluster_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: cloud: "{{ test_cloud }}" name: "{{ router_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: cloud: "{{ test_cloud }}" name: "{{ subnet_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: cloud: "{{ test_cloud }}" name: "{{ network_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop security group openstack.cloud.security_group: cloud: "{{ test_cloud }}" state: absent name: "{{ security_group_name }}" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/css_cluster_info/tasks/main.yaml b/tests/integration/targets/css_cluster_info/tasks/main.yaml index 98b98047..caaeb223 100644 --- a/tests/integration/targets/css_cluster_info/tasks/main.yaml +++ b/tests/integration/targets/css_cluster_info/tasks/main.yaml @@ -10,7 +10,7 @@ start: 0 register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/css_snapshot/tasks/main.yml b/tests/integration/targets/css_snapshot/tasks/main.yml index 01a04439..69b0a30f 100644 --- a/tests/integration/targets/css_snapshot/tasks/main.yml +++ b/tests/integration/targets/css_snapshot/tasks/main.yml @@ -88,7 +88,7 @@ name: "{{ snapshot_name }}" register: snapshot - - name: assert result + - name: Assert result ansible.builtin.assert: that: - snapshot is success @@ -102,7 +102,7 @@ register: created_snapshot check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - created_snapshot is success @@ -114,7 +114,7 @@ name: "{{ snapshot_name }}" register: created_snapshot - - name: assert result + - name: Assert result ansible.builtin.assert: that: - created_snapshot is success @@ -129,7 +129,7 @@ register: deleted_snapshot check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deleted_snapshot is not changed @@ -142,7 +142,7 @@ state: "absent" register: deleted_snapshot - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deleted_snapshot is changed @@ -156,28 +156,47 @@ cloud: "{{ test_cloud }}" name: "{{ css_cluster_name }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: cloud: "{{ test_cloud }}" name: "{{ router_name }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: cloud: "{{ test_cloud }}" name: "{{ subnet_name }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: cloud: "{{ test_cloud }}" name: "{{ network_name }}" state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop security group openstack.cloud.security_group: cloud: "{{ test_cloud }}" state: absent name: "{{ security_group_name }}" - ignore_errors: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/css_snapshot_info/tasks/main.yaml b/tests/integration/targets/css_snapshot_info/tasks/main.yaml index 24d26d98..d2688b32 100644 --- a/tests/integration/targets/css_snapshot_info/tasks/main.yaml +++ b/tests/integration/targets/css_snapshot_info/tasks/main.yaml @@ -10,7 +10,7 @@ register: result ignore_errors: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is not success diff --git a/tests/integration/targets/dds_datastore_info/tasks/main.yaml b/tests/integration/targets/dds_datastore_info/tasks/main.yaml index 69ed3f99..e573c710 100644 --- a/tests/integration/targets/dds_datastore_info/tasks/main.yaml +++ b/tests/integration/targets/dds_datastore_info/tasks/main.yaml @@ -9,7 +9,7 @@ datastore_name: "DDS-Community" register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/dds_flavor_info/tasks/main.yaml b/tests/integration/targets/dds_flavor_info/tasks/main.yaml index 7863c343..dfebc940 100644 --- a/tests/integration/targets/dds_flavor_info/tasks/main.yaml +++ b/tests/integration/targets/dds_flavor_info/tasks/main.yaml @@ -9,7 +9,7 @@ region: "{{ region | default('eu-de') }}" register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/dds_instance/tasks/main.yaml b/tests/integration/targets/dds_instance/tasks/main.yaml index 19f73726..79f224fd 100644 --- a/tests/integration/targets/dds_instance/tasks/main.yaml +++ b/tests/integration/targets/dds_instance/tasks/main.yaml @@ -18,12 +18,12 @@ dds_flavor: "dds.mongodb.s2.medium.4.repset" - name: Delete missing instance - dds_instance: + opentelekomcloud.cloud.dds_instance: state: absent name: "definitely_missing_instance" register: dds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dds is success @@ -80,7 +80,7 @@ ssl_option: 1 state: present - - name: assert result + - name: Assert result ansible.builtin.assert: that: - obj is success @@ -93,25 +93,37 @@ opentelekomcloud.cloud.dds_instance: name: "{{ instance_name }}" state: "absent" - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop router openstack.cloud.router: cloud: "{{ test_cloud }}" name: "{{ router_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop subnet openstack.cloud.subnet: cloud: "{{ test_cloud }}" name: "{{ subnet_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop network openstack.cloud.network: cloud: "{{ test_cloud }}" name: "{{ network_name }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/dds_instance_info/tasks/main.yaml b/tests/integration/targets/dds_instance_info/tasks/main.yaml index afc46573..922ec453 100644 --- a/tests/integration/targets/dds_instance_info/tasks/main.yaml +++ b/tests/integration/targets/dds_instance_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.dds_instance_info: register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/deh_host/tasks/main.yaml b/tests/integration/targets/deh_host/tasks/main.yaml index 9a5ca17d..2bdf3038 100644 --- a/tests/integration/targets/deh_host/tasks/main.yaml +++ b/tests/integration/targets/deh_host/tasks/main.yaml @@ -37,7 +37,7 @@ check_mode: true register: deh_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh_ch is success @@ -57,7 +57,7 @@ value: value2 register: deh - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh is success @@ -72,7 +72,7 @@ - deh is defined register: deh_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh_ch is success @@ -85,7 +85,7 @@ - deh is defined register: deh - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh is success @@ -97,7 +97,7 @@ - deh is defined register: server - - name: assert result + - name: Assert result ansible.builtin.assert: that: - server is success @@ -110,5 +110,7 @@ opentelekomcloud.cloud.deh_host: name: "{{ deh.deh_host.name }}" state: absent - register: deh - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/deh_host_info/tasks/main.yaml b/tests/integration/targets/deh_host_info/tasks/main.yaml index 86f22ba8..98a1c95a 100644 --- a/tests/integration/targets/deh_host_info/tasks/main.yaml +++ b/tests/integration/targets/deh_host_info/tasks/main.yaml @@ -6,11 +6,11 @@ cloud: "{{ test_cloud }}" register: deh - - name: debug deh + - name: Debug deh ansible.builtin.debug: var: deh.deh_hosts - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh is success diff --git a/tests/integration/targets/deh_host_type_info/tasks/main.yaml b/tests/integration/targets/deh_host_type_info/tasks/main.yaml index 0686638a..1b8e32b1 100644 --- a/tests/integration/targets/deh_host_type_info/tasks/main.yaml +++ b/tests/integration/targets/deh_host_type_info/tasks/main.yaml @@ -7,11 +7,11 @@ az: "{{ deh_az | default('eu-de-01') }}" register: deh - - name: debug deh + - name: Debug deh ansible.builtin.debug: var: deh.deh_host_types - - name: assert result + - name: Assert result ansible.builtin.assert: that: - deh is success diff --git a/tests/integration/targets/dms/tasks/main.yaml b/tests/integration/targets/dms/tasks/main.yaml index a02fee7d..91af2a52 100644 --- a/tests/integration/targets/dms/tasks/main.yaml +++ b/tests/integration/targets/dms/tasks/main.yaml @@ -112,42 +112,52 @@ queue_name: '{{ queue_name }}' group_name: '{{ group_name }}' state: absent - register: dms_queue_group_rm - check_mode: false - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete Queue opentelekomcloud.cloud.dms_queue: name: '{{ queue_name }}' state: absent - register: dms_queue_rm - check_mode: false - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Delete Security Group openstack.cloud.security_group: name: "{{ sg_name }}" state: absent - register: dms_sg - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing Router openstack.cloud.router: name: "{{ router_name }}" state: absent - register: dns_rout_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet_name }}" state: absent - register: dns_subnet_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network_name }}" state: absent - register: dns_net_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/dns_private/tasks/main.yaml b/tests/integration/targets/dns_private/tasks/main.yaml index dd161661..9dc78220 100644 --- a/tests/integration/targets/dns_private/tasks/main.yaml +++ b/tests/integration/targets/dns_private/tasks/main.yaml @@ -50,7 +50,7 @@ check_mode: true register: dns_zo_pr_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_pr_ch is success @@ -64,16 +64,16 @@ state: present register: dns_zo_pr - - name: debug + - name: Debug ansible.builtin.debug: var: dns_zo_pr.zone - - name: check zone is created + - name: Check zone is created opentelekomcloud.cloud.dns_zone_info: name: "{{ dns_zo_pr.zone.id }}" register: dns_zo_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_pr is success @@ -88,7 +88,7 @@ check_mode: true register: dns_zo_pr_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_pr_ch is success @@ -102,11 +102,11 @@ zone_type: "private" register: dns_zo_pr - - name: debug + - name: Debug ansible.builtin.debug: var: dns_zo_pr.zone - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_pr is success @@ -117,7 +117,7 @@ zone: "{{ dns_zo_pr.zone.id }}" register: dns_ns - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_ns is success @@ -131,26 +131,34 @@ name: "{{ dns_zo_pr.zone.id }}" zone_type: "private" state: absent - register: dns_zo_pr_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing Router openstack.cloud.router: name: "{{ router_name }}" state: absent - register: dns_rout_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet_name }}" state: absent - register: dns_subnet_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network_name }}" state: absent - register: dns_net_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/dns_public/tasks/main.yaml b/tests/integration/targets/dns_public/tasks/main.yaml index 22aec46f..6bc86254 100644 --- a/tests/integration/targets/dns_public/tasks/main.yaml +++ b/tests/integration/targets/dns_public/tasks/main.yaml @@ -29,7 +29,7 @@ check_mode: true register: dns_fl_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_fl_ch is success @@ -42,11 +42,11 @@ state: present register: dns_fl - - name: debug + - name: Debug ansible.builtin.debug: var: dns_fl.ptr - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_fl is success @@ -61,7 +61,7 @@ check_mode: true register: dns_fl_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_fl_ch is success @@ -75,11 +75,11 @@ state: present register: dns_fl - - name: debug + - name: Debug ansible.builtin.debug: var: dns_fl.ptr - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_fl is success @@ -92,7 +92,7 @@ check_mode: true register: dns_zo_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_ch is success @@ -104,17 +104,17 @@ state: present register: dns_zo - - name: debug + - name: Debug ansible.builtin.debug: var: dns_zo.zone - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo is success - dns_zo.zone is defined - - name: check zone is created + - name: Check zone is created opentelekomcloud.cloud.dns_zone_info: name: "{{ dns_zo.zone.id }}" register: dns_zo_info @@ -127,7 +127,7 @@ check_mode: true register: dns_zo_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo_ch is success @@ -140,7 +140,7 @@ description: "{{ description }}" register: dns_zo - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_zo is success @@ -151,7 +151,7 @@ zone: "{{ zone_public_name }}" register: dns_ns - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_ns is success @@ -169,7 +169,7 @@ check_mode: true register: dns_rs_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_rs_ch is success @@ -186,11 +186,11 @@ state: present register: dns_rs - - name: debug + - name: Debug ansible.builtin.debug: var: dns_rs.recordset - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_rs is success @@ -209,7 +209,7 @@ check_mode: true register: dns_rs_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_rs_ch is success @@ -227,11 +227,11 @@ state: present register: dns_rs - - name: debug + - name: Debug ansible.builtin.debug: var: dns_rs.recordset - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dns_rs is success @@ -244,28 +244,36 @@ opentelekomcloud.cloud.dns_floating_ip: floating_ip: "{{ fl_ip }}" state: absent - register: dns_fl_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Dropping DNS Recordset opentelekomcloud.cloud.dns_recordset: zone_id: "{{ dns_zo.zone.id }}" recordset_name: "{{ rs_name }}" state: absent - register: dns_rs_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop DNS public Zone opentelekomcloud.cloud.dns_zone: name: "{{ zone_public_name }}" state: absent - register: dns_zo_pu_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop Floating IP opentelekomcloud.cloud.floating_ip: floating_ip_address: "{{ fl_ip }}" state: absent purge: true - register: fl_dr - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/dns_recordset_info/tasks/main.yaml b/tests/integration/targets/dns_recordset_info/tasks/main.yaml index e2ba36f2..e6bb61d7 100644 --- a/tests/integration/targets/dns_recordset_info/tasks/main.yaml +++ b/tests/integration/targets/dns_recordset_info/tasks/main.yaml @@ -40,7 +40,7 @@ zone: "{{ dns_zo.zone.id }}" register: recordsets - - name: assert result + - name: Assert result ansible.builtin.assert: that: - recordsets is success @@ -53,7 +53,7 @@ name: "{{ dns_rs.recordset.name }}" register: rs - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rs is success diff --git a/tests/integration/targets/floating_ip/tasks/main.yaml b/tests/integration/targets/floating_ip/tasks/main.yaml index 5b14583b..c031b3ee 100644 --- a/tests/integration/targets/floating_ip/tasks/main.yaml +++ b/tests/integration/targets/floating_ip/tasks/main.yaml @@ -7,7 +7,7 @@ network: admin_external_net register: fip - - name: assert allocation + - name: Assert allocation ansible.builtin.assert: that: - fip is changed @@ -23,12 +23,7 @@ floating_ip_address: "{{ fip.floating_ip.floating_ip_address }}" purge: true state: absent - register: drop - - - name: assert check - ansible.builtin.assert: - that: - - drop is changed - - drop is success - - when: fip.floating_ip.floating_ip_address is defined + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/kms_info/tasks/main.yaml b/tests/integration/targets/kms_info/tasks/main.yaml index 2b848571..f13771d5 100644 --- a/tests/integration/targets/kms_info/tasks/main.yaml +++ b/tests/integration/targets/kms_info/tasks/main.yaml @@ -5,7 +5,7 @@ opentelekomcloud.cloud.kms_info: register: key - - name: assert result + - name: Assert result ansible.builtin.assert: that: - key is success diff --git a/tests/integration/targets/lb_certificate/tasks/main.yaml b/tests/integration/targets/lb_certificate/tasks/main.yaml index fc75bdf0..3e6f58f2 100644 --- a/tests/integration/targets/lb_certificate/tasks/main.yaml +++ b/tests/integration/targets/lb_certificate/tasks/main.yaml @@ -107,7 +107,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -118,7 +118,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -135,7 +135,7 @@ name: "{{ cert_name_ca }}" register: result_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -155,7 +155,7 @@ name: "{{ cert_name_srv }}" register: result_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -175,7 +175,7 @@ name: "{{ cert_name_ca }}" register: result_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -189,7 +189,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -208,7 +208,7 @@ name: "{{ cert_name_srv }}" register: result_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -222,7 +222,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -235,12 +235,16 @@ opentelekomcloud.cloud.lb_certificate: name: "{{ cert_name_ca }}" state: absent - register: drop - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop perhaps existing Server cert opentelekomcloud.cloud.lb_certificate: name: "{{ cert_name_srv }}" state: absent - register: drop - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/lb_certificate_info/tasks/main.yaml b/tests/integration/targets/lb_certificate_info/tasks/main.yaml index 9055c02a..a6a10402 100644 --- a/tests/integration/targets/lb_certificate_info/tasks/main.yaml +++ b/tests/integration/targets/lb_certificate_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.lb_certificate_info: register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -20,7 +20,7 @@ name: some_fake register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/lb_healtmonitor_info/tasks/main.yaml b/tests/integration/targets/lb_healtmonitor_info/tasks/main.yaml index 335174b4..ab2db4d9 100644 --- a/tests/integration/targets/lb_healtmonitor_info/tasks/main.yaml +++ b/tests/integration/targets/lb_healtmonitor_info/tasks/main.yaml @@ -8,11 +8,11 @@ opentelekomcloud.cloud.lb_healthmonitor_info: register: hm - - name: debug configs + - name: Debug configs ansible.builtin.debug: var: hm.healthmonitors - - name: assert result + - name: Assert result ansible.builtin.assert: that: - hm is success diff --git a/tests/integration/targets/lb_listener_certificates/tasks/main.yaml b/tests/integration/targets/lb_listener_certificates/tasks/main.yaml index 9af00bc4..ac13a02d 100644 --- a/tests/integration/targets/lb_listener_certificates/tasks/main.yaml +++ b/tests/integration/targets/lb_listener_certificates/tasks/main.yaml @@ -150,7 +150,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -161,7 +161,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -179,7 +179,7 @@ name: "{{ cert_name_srv_1 }}" register: cert_1_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cert_1 is success @@ -201,7 +201,7 @@ name: "{{ cert_name_srv_2 }}" register: cert_2_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cert_2 is success @@ -218,7 +218,7 @@ timeout: 150 register: lb - - name: assert result + - name: Assert result ansible.builtin.assert: that: - lb is success @@ -235,7 +235,7 @@ sni_container_refs: ["{{ cert_1.elb_certificate.id }}"] register: listener - - name: assert result + - name: Assert result ansible.builtin.assert: that: - listener is success @@ -252,7 +252,7 @@ sni_container_refs: ["{{ cert_1.elb_certificate.id }}"] register: listener - - name: assert result + - name: Assert result ansible.builtin.assert: that: - listener is success @@ -269,7 +269,7 @@ sni_container_refs: ["{{ cert_2.elb_certificate.id }}"] register: listener - - name: assert result + - name: Assert result ansible.builtin.assert: that: - listener is success @@ -281,7 +281,7 @@ name: "{{ listener_name }}" register: listener_drop - - name: assert result + - name: Assert result ansible.builtin.assert: that: - listener_drop is success @@ -294,7 +294,7 @@ delete_public_ip: true register: loadbalancer_drop - - name: assert result + - name: Assert result ansible.builtin.assert: that: - loadbalancer_drop is success @@ -306,7 +306,7 @@ state: absent register: cert_drop_1 - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cert_drop_1 is success @@ -318,7 +318,7 @@ state: absent register: cert_drop_2 - - name: assert result + - name: Assert result ansible.builtin.assert: that: - cert_drop_2 is success diff --git a/tests/integration/targets/loadbalancer/tasks/main.yaml b/tests/integration/targets/loadbalancer/tasks/main.yaml index 6d6b1a18..51dc5237 100644 --- a/tests/integration/targets/loadbalancer/tasks/main.yaml +++ b/tests/integration/targets/loadbalancer/tasks/main.yaml @@ -52,7 +52,7 @@ register: loadbalancer_check check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - loadbalancer_check is changed @@ -65,7 +65,7 @@ timeout: 150 register: lb - - name: assert result + - name: Assert result ansible.builtin.assert: that: - lb is success @@ -85,7 +85,7 @@ name: "{{ lb.loadbalancer.name }}" register: res - - name: assert result + - name: Assert result ansible.builtin.assert: that: - res is success @@ -102,7 +102,7 @@ name: "{{ listener_name }}" register: lstnr - - name: assert result + - name: Assert result ansible.builtin.assert: that: - lstnr is success @@ -115,7 +115,7 @@ name: "{{ listener_name }}" register: lstnr - - name: assert result + - name: Assert result ansible.builtin.assert: that: - lstnr is success @@ -126,7 +126,7 @@ name: "{{ lstnr.listener.name }}" register: res - - name: assert result + - name: Assert result ansible.builtin.assert: that: - res is success @@ -143,7 +143,7 @@ loadbalancer: "{{ lb.loadbalancer.id }}" register: pool - - name: assert result + - name: Assert result ansible.builtin.assert: that: - pool is success @@ -158,7 +158,7 @@ type: app_cookie register: pool - - name: assert result + - name: Assert result ansible.builtin.assert: that: - pool is success @@ -169,7 +169,7 @@ name: "{{ pool.server_group.name }}" register: res - - name: assert result + - name: Assert result ansible.builtin.assert: that: - res is success @@ -182,7 +182,7 @@ name: "{{ pool_name }}" register: dropped - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped is success @@ -194,7 +194,7 @@ name: "{{ listener_name }}" register: dropped - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped is success @@ -208,7 +208,7 @@ delete_public_ip: true register: dropped - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped is success @@ -221,7 +221,7 @@ state: absent register: dropped - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped is success @@ -235,26 +235,34 @@ name: "{{ lb.loadbalancer.id }}" state: absent delete_public_ip: true - register: lb - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing Router openstack.cloud.router: name: "{{ router_name }}" state: absent - register: lb_net_router - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet_name }}" state: absent - register: lb_net_subnet - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network_name }}" state: absent - register: lb_net - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/nat/tasks/main.yaml b/tests/integration/targets/nat/tasks/main.yaml index 3c3af3e1..422f192f 100644 --- a/tests/integration/targets/nat/tasks/main.yaml +++ b/tests/integration/targets/nat/tasks/main.yaml @@ -6,8 +6,22 @@ cloud: "{{ test_cloud }}" opentelekomcloud.cloud.floating_ip: cloud: "{{ test_cloud }}" + opentelekomcloud.cloud.nat_snat_rule: + cloud: "{{ test_cloud }}" + opentelekomcloud.cloud.nat_dnat_rule: + cloud: "{{ test_cloud }}" + opentelekomcloud.cloud.nat_snat_rule_info: + cloud: "{{ test_cloud }}" + opentelekomcloud.cloud.nat_dnat_rule_info: + cloud: "{{ test_cloud }}" openstack.cloud.server: cloud: "{{ test_cloud }}" + openstack.cloud.network: + cloud: "{{ test_cloud }}" + openstack.cloud.subnet: + cloud: "{{ test_cloud }}" + openstack.cloud.router: + cloud: "{{ test_cloud }}" block: - name: Set random prefix @@ -58,7 +72,7 @@ check_mode: true register: nat_gw_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - nat_gw_ch is success @@ -71,7 +85,7 @@ router: "{{ router_name }}" register: nat_gw - - name: assert result + - name: Assert result ansible.builtin.assert: that: - nat_gw is success @@ -84,7 +98,7 @@ check_mode: true register: nat_gw_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - nat_gw_ch is success @@ -96,7 +110,7 @@ description: test-description register: nat_gw - - name: assert result + - name: Assert result ansible.builtin.assert: that: - nat_gw is success @@ -107,7 +121,7 @@ network: admin_external_net register: fip - - name: assert result + - name: Assert result ansible.builtin.assert: that: - fip is success @@ -121,7 +135,7 @@ check_mode: true register: snat_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - snat_ch is success @@ -134,7 +148,7 @@ floating_ip: "{{ fip.floating_ip.floating_ip_address }}" register: snat - - name: assert result + - name: Assert result ansible.builtin.assert: that: - snat is success @@ -160,7 +174,7 @@ network: admin_external_net register: fip2 - - name: assert result + - name: Assert result ansible.builtin.assert: that: - fip2 is success @@ -179,7 +193,7 @@ check_mode: true register: dnat_ch - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dnat_ch is success @@ -197,7 +211,7 @@ private_ip: "192.168.0.2" register: dnat - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dnat is success @@ -223,7 +237,9 @@ - nat_gw.gateway.id is defined - snat_rules.snat_rules is defined register: snat - failed_when: false + until: snat is not failed + ignore_errors: true + retries: 10 - name: Drop EIP for snat rule opentelekomcloud.cloud.floating_ip: @@ -232,7 +248,9 @@ state: absent when: fip is defined register: fip - failed_when: false + until: fip is not failed + ignore_errors: true + retries: 10 - name: List DNAT rules of gateway opentelekomcloud.cloud.nat_dnat_rule_info: @@ -240,7 +258,6 @@ when: - nat_gw.gateway.id is defined register: dnat_rules - failed_when: false - name: Drop DNAT rules opentelekomcloud.cloud.nat_dnat_rule: @@ -251,7 +268,9 @@ - nat_gw.gateway.id is defined - dnat_rules.dnat_rules is defined register: dnat - failed_when: false + until: dnat is not failed + ignore_errors: true + retries: 10 - name: Drop EIP for dnat rule opentelekomcloud.cloud.floating_ip: @@ -260,7 +279,9 @@ state: absent when: fip2 is defined register: fip2 - failed_when: false + until: fip2 is not failed + ignore_errors: true + retries: 10 # - name: Drop server instance # openstack.cloud.server: @@ -274,25 +295,33 @@ name: "{{ nat_gateway_name }}" state: absent register: nat_gw - failed_when: false + until: nat_gw is not failed + ignore_errors: true + retries: 10 - name: Drop existing Router openstack.cloud.router: name: "{{ router_name }}" state: absent register: nat_router - failed_when: false + until: nat_router is not failed + ignore_errors: true + retries: 10 - name: Drop existing subnet openstack.cloud.subnet: name: "{{ subnet_name }}" state: absent register: nat_subnet - failed_when: false + until: nat_subnet is not failed + ignore_errors: true + retries: 10 - name: Drop existing network openstack.cloud.network: name: "{{ network_name }}" state: absent register: nat_net - failed_when: false + until: nat_net is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/nat_dnat_rule_info/tasks/main.yaml b/tests/integration/targets/nat_dnat_rule_info/tasks/main.yaml index e40bdf17..a1cf1ca4 100644 --- a/tests/integration/targets/nat_dnat_rule_info/tasks/main.yaml +++ b/tests/integration/targets/nat_dnat_rule_info/tasks/main.yaml @@ -6,11 +6,11 @@ cloud: "{{ test_cloud }}" register: dn - - name: debug configs + - name: Debug configs ansible.builtin.debug: var: dn.dnat_rules - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dn is success diff --git a/tests/integration/targets/nat_gateway_info/tasks/main.yaml b/tests/integration/targets/nat_gateway_info/tasks/main.yaml index da2db89d..ef8a9f4a 100644 --- a/tests/integration/targets/nat_gateway_info/tasks/main.yaml +++ b/tests/integration/targets/nat_gateway_info/tasks/main.yaml @@ -6,11 +6,11 @@ cloud: "{{ test_cloud }}" register: gw - - name: debug configs + - name: Debug configs ansible.builtin.debug: var: gw.nat_gateways - - name: assert result + - name: Assert result ansible.builtin.assert: that: - gw is success diff --git a/tests/integration/targets/nat_snat_rule_info/tasks/main.yaml b/tests/integration/targets/nat_snat_rule_info/tasks/main.yaml index fb279723..d1151bcc 100644 --- a/tests/integration/targets/nat_snat_rule_info/tasks/main.yaml +++ b/tests/integration/targets/nat_snat_rule_info/tasks/main.yaml @@ -6,11 +6,11 @@ cloud: "{{ test_cloud }}" register: sn - - name: debug configs + - name: Debug configs ansible.builtin.debug: var: sn.snat_rules - - name: assert result + - name: Assert result ansible.builtin.assert: that: - sn is success diff --git a/tests/integration/targets/object_info/tasks/main.yaml b/tests/integration/targets/object_info/tasks/main.yaml index 6684b15b..49f9b852 100644 --- a/tests/integration/targets/object_info/tasks/main.yaml +++ b/tests/integration/targets/object_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.object_info: register: containers - - name: assert result + - name: Assert result ansible.builtin.assert: that: - containers is success diff --git a/tests/integration/targets/rds_backup/tasks/main.yaml b/tests/integration/targets/rds_backup/tasks/main.yaml index f594b7c8..008d6e50 100644 --- a/tests/integration/targets/rds_backup/tasks/main.yaml +++ b/tests/integration/targets/rds_backup/tasks/main.yaml @@ -12,7 +12,7 @@ check_mode: true ignore_errors: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds_backup is not success diff --git a/tests/integration/targets/rds_datastore_info/tasks/main.yaml b/tests/integration/targets/rds_datastore_info/tasks/main.yaml index 6bb5c3c1..8dd92b62 100644 --- a/tests/integration/targets/rds_datastore_info/tasks/main.yaml +++ b/tests/integration/targets/rds_datastore_info/tasks/main.yaml @@ -7,7 +7,7 @@ datastore: "postgresql" register: rds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds is success diff --git a/tests/integration/targets/rds_flavor_info/tasks/main.yaml b/tests/integration/targets/rds_flavor_info/tasks/main.yaml index 476b0949..b8ebcff9 100644 --- a/tests/integration/targets/rds_flavor_info/tasks/main.yaml +++ b/tests/integration/targets/rds_flavor_info/tasks/main.yaml @@ -11,7 +11,7 @@ instance_mode: "single" register: rds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds is success diff --git a/tests/integration/targets/rds_instance/tasks/main.yaml b/tests/integration/targets/rds_instance/tasks/main.yaml index e64e3a24..61b15e6d 100644 --- a/tests/integration/targets/rds_instance/tasks/main.yaml +++ b/tests/integration/targets/rds_instance/tasks/main.yaml @@ -22,7 +22,7 @@ name: "definitely_missing_instance" register: rds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds is success @@ -74,7 +74,7 @@ timeout: 600 register: obj - - name: assert result + - name: Assert result ansible.builtin.assert: that: - obj is success diff --git a/tests/integration/targets/rds_instance_info/tasks/main.yaml b/tests/integration/targets/rds_instance_info/tasks/main.yaml index d8d308ae..88dc209c 100644 --- a/tests/integration/targets/rds_instance_info/tasks/main.yaml +++ b/tests/integration/targets/rds_instance_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.rds_instance_info: register: rds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds is success @@ -48,7 +48,7 @@ router: some_fake_router register: rds - - name: assert result + - name: Assert result ansible.builtin.assert: that: - rds is success diff --git a/tests/integration/targets/security_group/tasks/main.yaml b/tests/integration/targets/security_group/tasks/main.yaml index 04882059..f68ab2b8 100644 --- a/tests/integration/targets/security_group/tasks/main.yaml +++ b/tests/integration/targets/security_group/tasks/main.yaml @@ -31,7 +31,7 @@ "protocol": "icmp" register: sg - - name: assert result + - name: Assert result ansible.builtin.assert: that: - sg is success @@ -44,3 +44,7 @@ opentelekomcloud.cloud.security_group: name: "{{ security_group_name }}" state: "absent" + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/security_group_info/tasks/main.yaml b/tests/integration/targets/security_group_info/tasks/main.yaml index ff7851fd..714580ae 100644 --- a/tests/integration/targets/security_group_info/tasks/main.yaml +++ b/tests/integration/targets/security_group_info/tasks/main.yaml @@ -9,7 +9,7 @@ opentelekomcloud.cloud.security_group_info: register: sg - - name: assert result + - name: Assert result ansible.builtin.assert: that: - sg is success diff --git a/tests/integration/targets/server_group_info/tasks/main.yaml b/tests/integration/targets/server_group_info/tasks/main.yaml index cc55e916..666fbe60 100644 --- a/tests/integration/targets/server_group_info/tasks/main.yaml +++ b/tests/integration/targets/server_group_info/tasks/main.yaml @@ -9,7 +9,7 @@ opentelekomcloud.cloud.server_group_info: register: sg - - name: assert result + - name: Assert result ansible.builtin.assert: that: - sg is success diff --git a/tests/integration/targets/subnet/tasks/main.yaml b/tests/integration/targets/subnet/tasks/main.yaml index 82625b40..a2513b9a 100644 --- a/tests/integration/targets/subnet/tasks/main.yaml +++ b/tests/integration/targets/subnet/tasks/main.yaml @@ -80,34 +80,24 @@ - updated_subnet is changed - updated_subnet.subnet is defined - - name: Delete subnet - opentelekomcloud.cloud.subnet: - name: "{{ subnet_name }}" - vpc: "{{ vpc_name }}" - state: absent - register: deleted_subnet - - - name: Assert result - ansible.builtin.assert: - that: - - deleted_subnet is success - - deleted_subnet is changed - - - name: Check deleted subnet - opentelekomcloud.cloud.subnet: - name: "{{ subnet_name }}" - vpc: "{{ vpc_name }}" - state: absent - register: deleted_subnet_check - check_mode: true + always: + - name: Cleanup + block: + - name: Delete subnet + opentelekomcloud.cloud.subnet: + name: "{{ subnet_name }}" + vpc: "{{ vpc_name }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - - name: Assert result - ansible.builtin.assert: - that: - - deleted_subnet_check is success - - deleted_subnet_check is not changed - - - name: Delete VPC - opentelekomcloud.cloud.vpc: - name: "{{ vpc_name }}" - state: absent + - name: Delete VPC + opentelekomcloud.cloud.vpc: + name: "{{ vpc_name }}" + state: absent + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/subnet_info/tasks/main.yaml b/tests/integration/targets/subnet_info/tasks/main.yaml index 03d94cf0..cd0ed20c 100644 --- a/tests/integration/targets/subnet_info/tasks/main.yaml +++ b/tests/integration/targets/subnet_info/tasks/main.yaml @@ -45,7 +45,7 @@ vpc: "{{ vpc_name }}" register: all_subnets - - name: assert result + - name: Assert result ansible.builtin.assert: that: - all_subnets is success @@ -57,7 +57,7 @@ name_or_id: "{{ subnet_name }}" register: new_subnet - - name: assert result + - name: Assert result ansible.builtin.assert: that: - new_subnet is success diff --git a/tests/integration/targets/volume_backup_info/tasks/main.yaml b/tests/integration/targets/volume_backup_info/tasks/main.yaml index c4e73494..c1522691 100644 --- a/tests/integration/targets/volume_backup_info/tasks/main.yaml +++ b/tests/integration/targets/volume_backup_info/tasks/main.yaml @@ -9,7 +9,7 @@ ansible.builtin.debug: var: backup - - name: assert result + - name: Assert result ansible.builtin.assert: that: - backup is success diff --git a/tests/integration/targets/volume_snapshot_info/tasks/main.yaml b/tests/integration/targets/volume_snapshot_info/tasks/main.yaml index 63273aa7..1b9b0aeb 100644 --- a/tests/integration/targets/volume_snapshot_info/tasks/main.yaml +++ b/tests/integration/targets/volume_snapshot_info/tasks/main.yaml @@ -9,7 +9,7 @@ ansible.builtin.debug: var: snapshot - - name: assert result + - name: Assert result ansible.builtin.assert: that: - snapshot is success diff --git a/tests/integration/targets/vpc/tasks/main.yaml b/tests/integration/targets/vpc/tasks/main.yaml index 6f0e48f2..28aab029 100644 --- a/tests/integration/targets/vpc/tasks/main.yaml +++ b/tests/integration/targets/vpc/tasks/main.yaml @@ -22,7 +22,7 @@ check_mode: true register: vpc_check_mode - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_check_mode is success @@ -36,7 +36,7 @@ state: present register: vpc - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc is success @@ -49,20 +49,20 @@ description: "Test vpc" register: updated_vpc - - name: assert result + - name: Assert result ansible.builtin.assert: that: - updated_vpc is success - updated_vpc is defined - - name: Delete VPC - opentelekomcloud.cloud.vpc: - name: "{{ vpc_name }}" - state: "absent" - register: deleted_vpc - - - name: assert result - ansible.builtin.assert: - that: - - deleted_vpc is success - - deleted_vpc is changed + always: + - name: Cleanup + block: + - name: Delete VPC + opentelekomcloud.cloud.vpc: + name: "{{ vpc_name }}" + state: "absent" + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/vpc_info/tasks/main.yaml b/tests/integration/targets/vpc_info/tasks/main.yaml index 4b352fd7..78661c32 100644 --- a/tests/integration/targets/vpc_info/tasks/main.yaml +++ b/tests/integration/targets/vpc_info/tasks/main.yaml @@ -25,7 +25,7 @@ opentelekomcloud.cloud.vpc_info: register: all_vpcs - - name: assert result + - name: Assert result ansible.builtin.assert: that: - all_vpcs is success @@ -37,7 +37,7 @@ name_or_id: "{{ vpc_name }}" register: new_vpc - - name: assert result + - name: Assert result ansible.builtin.assert: that: - new_vpc is success diff --git a/tests/integration/targets/vpc_peering_info_test/tasks/main.yaml b/tests/integration/targets/vpc_peering_info_test/tasks/main.yaml index 98bea441..73c09253 100644 --- a/tests/integration/targets/vpc_peering_info_test/tasks/main.yaml +++ b/tests/integration/targets/vpc_peering_info_test/tasks/main.yaml @@ -9,7 +9,7 @@ ansible.builtin.debug: var: vpc_peerings - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_peerings is success diff --git a/tests/integration/targets/vpc_peering_test/tasks/main.yaml b/tests/integration/targets/vpc_peering_test/tasks/main.yaml index 61b1efb4..64fb5284 100644 --- a/tests/integration/targets/vpc_peering_test/tasks/main.yaml +++ b/tests/integration/targets/vpc_peering_test/tasks/main.yaml @@ -84,7 +84,7 @@ register: vpc_peering_check check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_peering_check is changed @@ -98,7 +98,7 @@ remote_project: "{{ project_id }}" register: vpc_peering - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_peering is success @@ -114,7 +114,7 @@ remote_project: "{{ project_id }}" register: updated_vpc_peering - - name: assert result + - name: Assert result ansible.builtin.assert: that: - updated_vpc_peering is success @@ -129,46 +129,60 @@ name: "{{ updated_vpc_peering.vpc_peering.name }}" state: absent register: dropped - failed_when: false - - - name: assert result - ansible.builtin.assert: - that: - - dropped is success - - dropped is changed + until: dropped is not failed + ignore_errors: true + retries: 10 - name: Drop existing first router openstack.cloud.router: name: "{{ router_name_1 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing first subnet openstack.cloud.subnet: name: "{{ subnet_name_1 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing first network openstack.cloud.network: name: "{{ network_name_1 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing second router openstack.cloud.router: name: "{{ router_name_2 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing second subnet openstack.cloud.subnet: name: "{{ subnet_name_2 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 - name: Drop existing second network openstack.cloud.network: name: "{{ network_name_2 }}" state: absent - failed_when: false + register: removed + until: removed is not failed + ignore_errors: true + retries: 10 diff --git a/tests/integration/targets/vpc_route_info_test/tasks/main.yaml b/tests/integration/targets/vpc_route_info_test/tasks/main.yaml index c4b39e44..18bb88cf 100644 --- a/tests/integration/targets/vpc_route_info_test/tasks/main.yaml +++ b/tests/integration/targets/vpc_route_info_test/tasks/main.yaml @@ -9,7 +9,7 @@ ansible.builtin.debug: var: vpc_routes - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_routes is success diff --git a/tests/integration/targets/vpc_route_test/tasks/main.yaml b/tests/integration/targets/vpc_route_test/tasks/main.yaml index 340c1123..7cc0785f 100644 --- a/tests/integration/targets/vpc_route_test/tasks/main.yaml +++ b/tests/integration/targets/vpc_route_test/tasks/main.yaml @@ -91,7 +91,7 @@ register: vpc_route_check check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_route_check is changed @@ -103,7 +103,7 @@ router: "{{ test_router_1.router.id }}" register: vpc_route - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpc_route is success @@ -120,7 +120,7 @@ register: dropped failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - dropped is success diff --git a/tests/integration/targets/vpn_service_info/tasks/main.yaml b/tests/integration/targets/vpn_service_info/tasks/main.yaml index 81b0ddea..22237714 100644 --- a/tests/integration/targets/vpn_service_info/tasks/main.yaml +++ b/tests/integration/targets/vpn_service_info/tasks/main.yaml @@ -9,7 +9,7 @@ register: vpn_service_info failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpn_service_info is success @@ -21,7 +21,7 @@ register: vpn_service_info failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpn_service_info is success @@ -35,7 +35,7 @@ register: vpn_service_info failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpn_service_info is success @@ -49,7 +49,7 @@ register: vpn_service_info failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpn_service_info is success @@ -65,7 +65,7 @@ register: vpn_service_info failed_when: false - - name: assert result + - name: Assert result ansible.builtin.assert: that: - vpn_service_info is success diff --git a/tests/integration/targets/waf_certificate/tasks/main.yaml b/tests/integration/targets/waf_certificate/tasks/main.yaml index 842906ec..3608db26 100644 --- a/tests/integration/targets/waf_certificate/tasks/main.yaml +++ b/tests/integration/targets/waf_certificate/tasks/main.yaml @@ -65,7 +65,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -82,7 +82,7 @@ name: "{{ cert_name }}" register: result_info - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -96,7 +96,7 @@ state: absent register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -107,7 +107,7 @@ name: "{{ cert_name }}" register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/waf_certificate_info/tasks/main.yaml b/tests/integration/targets/waf_certificate_info/tasks/main.yaml index 7d96330a..433635eb 100644 --- a/tests/integration/targets/waf_certificate_info/tasks/main.yaml +++ b/tests/integration/targets/waf_certificate_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.waf_certificate_info: register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success @@ -20,7 +20,7 @@ name: some_fake register: result - - name: assert result + - name: Assert result ansible.builtin.assert: that: - result is success diff --git a/tests/integration/targets/waf_domain/tasks/main.yaml b/tests/integration/targets/waf_domain/tasks/main.yaml index 6ddbb7ae..fd775bd5 100644 --- a/tests/integration/targets/waf_domain/tasks/main.yaml +++ b/tests/integration/targets/waf_domain/tasks/main.yaml @@ -97,7 +97,7 @@ register: domain_check check_mode: true - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain_check is changed @@ -119,7 +119,7 @@ - X-Forwarded-For register: domain - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain is success @@ -142,7 +142,7 @@ - X-Forwarded-For register: domain_modified - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain_modified is success @@ -161,7 +161,7 @@ name: "{{ domain_name }}" register: res - - name: assert result + - name: Assert result ansible.builtin.assert: that: - res is success @@ -174,7 +174,7 @@ name: "{{ domain.waf_domain.id }}" register: res - - name: assert result + - name: Assert result ansible.builtin.assert: that: - res is success @@ -188,7 +188,7 @@ state: absent register: domain - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain is success @@ -200,7 +200,7 @@ state: absent register: domain - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain is success diff --git a/tests/integration/targets/waf_domain_info/tasks/main.yaml b/tests/integration/targets/waf_domain_info/tasks/main.yaml index e6eac03c..cb61c54d 100644 --- a/tests/integration/targets/waf_domain_info/tasks/main.yaml +++ b/tests/integration/targets/waf_domain_info/tasks/main.yaml @@ -8,7 +8,7 @@ opentelekomcloud.cloud.waf_domain_info: register: domain - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain is success @@ -20,7 +20,7 @@ name: www.fakedomain.otc register: domain - - name: assert result + - name: Assert result ansible.builtin.assert: that: - domain is success