Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions tests/integration/targets/cs_ip_address/tasks/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down