-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
233 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cloud/cs | ||
shippable/cs/group1 | ||
cs/group1 | ||
cs/group3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cloud/cs | ||
shippable/cs/group1 | ||
cs/group1 | ||
cs/group3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cloud/cs | ||
cs/group1 | ||
cs/group3 |
3 changes: 3 additions & 0 deletions
3
tests/integration/targets/instance_nic_secondaryip/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
dependencies: | ||
- cs_common |
221 changes: 221 additions & 0 deletions
221
tests/integration/targets/instance_nic_secondaryip/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
--- | ||
- name: setup network | ||
ngine_io.cloudstack.network: | ||
name: "net_nic" | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_offering: DefaultSharedNetworkOffering | ||
network_domain: example.com | ||
vlan: "1234" | ||
start_ip: 10.100.123.11 | ||
end_ip: 10.100.123.250 | ||
gateway: 10.100.123.1 | ||
netmask: 255.255.255.0 | ||
register: net | ||
- name: verify setup network | ||
assert: | ||
that: | ||
- net is successful | ||
- net.name == "net_nic" | ||
|
||
- name: setup instance | ||
ngine_io.cloudstack.instance: | ||
name: "instance-nic-vm" | ||
template: "{{ cs_common_template }}" | ||
service_offering: "{{ cs_common_service_offering }}" | ||
zone: "{{ cs_common_zone_adv }}" | ||
network: "net_nic" | ||
state: stopped | ||
register: instance | ||
- name: verify setup instance | ||
assert: | ||
that: | ||
- instance is successful | ||
- instance.name == "instance-nic-vm" | ||
- instance.state == "Stopped" | ||
|
||
- name: setup network 2 | ||
ngine_io.cloudstack.network: | ||
name: "net_nic2" | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_offering: DefaultSharedNetworkOffering | ||
network_domain: example.com | ||
vlan: "1235" | ||
start_ip: 10.100.124.11 | ||
end_ip: 10.100.124.250 | ||
gateway: 10.100.124.1 | ||
netmask: 255.255.255.0 | ||
register: net | ||
- name: verify setup network 2 | ||
assert: | ||
that: | ||
- net is successful | ||
- net.name == "net_nic2" | ||
|
||
- name: setup nic | ||
ngine_io.cloudstack.instance_nic: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
ip_address: 10.100.124.42 | ||
zone: "{{ cs_common_zone_adv }}" | ||
register: nic | ||
- name: verify test create nic | ||
assert: | ||
that: | ||
- nic is successful | ||
- nic.ip_address == "10.100.124.42" | ||
- nic.netmask == "255.255.255.0" | ||
- nic.network == "net_nic2" | ||
- nic.vm == "instance-nic-vm" | ||
- nic.zone == cs_common_zone_adv | ||
- nic.mac_address is defined | ||
|
||
- name: setup remove secondary ip | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: sip | ||
- name: verify setup remove secondary ip | ||
assert: | ||
that: | ||
- sip is successful | ||
|
||
- name: test add secondary ip in check mode | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
check_mode: true | ||
register: sip | ||
- name: verify test add secondary ip in check mode | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is changed | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: test add secondary ip | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
register: sip | ||
- name: verify test add secondary ip | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is changed | ||
- sip.vm_guest_ip == "10.100.124.43" | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: test add secondary ip idempotence | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
register: sip | ||
- name: verify test add secondary ip idempotence | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is not changed | ||
- sip.vm_guest_ip == "10.100.124.43" | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: test remove secondary ip in check mode | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
check_mode: true | ||
register: sip | ||
- name: verify test remove secondary ip in check mode | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is changed | ||
- sip.vm_guest_ip == "10.100.124.43" | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: test remove secondary ip | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: sip | ||
- name: verify test remove secondary ip | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is changed | ||
- sip.vm_guest_ip == "10.100.124.43" | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: test remove secondary ip idempotence | ||
ngine_io.cloudstack.instance_nic_secondaryip: | ||
vm: "instance-nic-vm" | ||
network: "net_nic2" | ||
vm_guest_ip: 10.100.124.43 | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: sip | ||
- name: verify test remove secondary ip idempotence | ||
assert: | ||
that: | ||
- sip is successful | ||
- sip is not changed | ||
- sip.network == "net_nic2" | ||
- sip.vm == "instance-nic-vm" | ||
- sip.zone == cs_common_zone_adv | ||
|
||
- name: cleanup instance | ||
ngine_io.cloudstack.instance: | ||
name: "instance-nic-vm" | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: expunged | ||
register: instance | ||
- name: verify cleanup instance | ||
assert: | ||
that: | ||
- instance is successful | ||
|
||
- name: cleanup network | ||
ngine_io.cloudstack.network: | ||
name: "net_nic" | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: net | ||
- name: verify cleanup network | ||
assert: | ||
that: | ||
- net is successful | ||
|
||
- name: cleanup network 2 | ||
ngine_io.cloudstack.network: | ||
name: "net_nic2" | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: net | ||
- name: verify cleanup network 2 | ||
assert: | ||
that: | ||
- net is successful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
cloud/cs | ||
shippable/cs/group2 | ||
cs/group2 | ||
cs/group3 |