1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

cloudstack: test: ensure network is implemented (#52204)

In ACS 4.12, it is no longer possbile to acquire IPs to a (...) network
not already in implemented state.

With deployment of a VM instance, we enforce the implementation of the
network. Also see 323f791efc
This commit is contained in:
René Moser 2019-02-14 23:44:50 +01:00 committed by GitHub
parent 1219aa811a
commit 0cc23de776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View file

@ -11,6 +11,23 @@
that:
- net is successful
- name: setup instance to get network in implementation state
cs_instance:
name: "{{ cs_resource_prefix }}-vm-cs-firewall"
template: "{{ cs_common_template }}"
service_offering: "{{ cs_common_service_offering }}"
zone: "{{ cs_common_zone_adv }}"
networks:
- "{{ net.name }}"
register: instance
until: instance is success
retries: 10
delay: 5
- name: verify instance setup
assert:
that:
- instance is successful
- name: public ip address setup
cs_ip_address:
network: ansible test
@ -444,6 +461,17 @@
- fw is successful
- fw is not changed
- name: cleanup instance
cs_instance:
name: "{{ cs_resource_prefix }}-vm-cs-firewall"
zone: "{{ cs_common_zone_adv }}"
state: expunged
register: instance
- name: verify instance cleanup
assert:
that:
- instance is successful
- name: network cleanup
cs_network:
name: "{{ cs_firewall_network }}"

View file

@ -17,6 +17,23 @@
that:
- base_network is successful
- name: setup instance to get network in implementation state
cs_instance:
name: "{{ cs_resource_prefix }}-vm-cs-ip-address"
template: "{{ cs_common_template }}"
service_offering: "{{ cs_common_service_offering }}"
zone: "{{ cs_common_zone_adv }}"
networks:
- "{{ base_network.name }}"
register: instance
until: instance is success
retries: 10
delay: 5
- name: verify instance setup
assert:
that:
- instance is successful
- name: setup clean ip_address with tags
cs_ip_address:
state: absent
@ -205,6 +222,17 @@
- ip_address is successful
- 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:
- instance is successful
- name: clean the test network
cs_network:
name: ipaddr_test_network