diff --git a/tests/integration/targets/cs_ip_address/tasks/network.yml b/tests/integration/targets/cs_ip_address/tasks/network.yml index e87ff972..4a7499e0 100644 --- a/tests/integration/targets/cs_ip_address/tasks/network.yml +++ b/tests/integration/targets/cs_ip_address/tasks/network.yml @@ -222,12 +222,70 @@ - ip_address is successful - ip_address is not changed +- name: test associate specifc ip address + cs_ip_address: + ip_address: 192.168.2.199 + network: ipaddr_test_network + zone: "{{ cs_common_zone_adv }}" + register: specific_ip_address + +- name: verify test associate specifc ip address + assert: + that: + - specific_ip_address is successful + - specific_ip_address is changed + - specific_ip_address.ip_address == "192.168.2.199" + +- name: test associate specific ip idempotence + cs_ip_address: + ip_address: 192.168.2.199 + network: ipaddr_test_network + zone: "{{ cs_common_zone_adv }}" + register: specific_ip_address + +- name: verify test associate specifc ip address idempotence + assert: + that: + - specific_ip_address is successful + - specific_ip_address is not changed + - specific_ip_address.ip_address == "192.168.2.199" + +- name: test dissasociate specific ip + cs_ip_address: + state: absent + ip_address: 192.168.2.199 + network: ipaddr_test_network + zone: "{{ cs_common_zone_adv }}" + register: specific_ip_address + +- name: verify test dissasociate specific ip + assert: + that: + - specific_ip_address is successful + - specific_ip_address is changed + - specific_ip_address.ip_address == "192.168.2.199" + +- name: test dissasociate specific ip idempotence + cs_ip_address: + state: absent + ip_address: 192.168.2.199 + network: ipaddr_test_network + zone: "{{ cs_common_zone_adv }}" + register: specific_ip_address + +- name: verify test dissasociate specific ip idempotence + assert: + that: + - specific_ip_address is successful + - specific_ip_address is not changed + - name: cleanup instance cs_instance: name: "{{ cs_resource_prefix }}-vm-cs-ip-address" zone: "{{ cs_common_zone_adv }}" state: expunged register: instance + - name: verify instance cleanup assert: that: