-
-
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.
add ssh_key, network, network_offering
- Loading branch information
Showing
10 changed files
with
1,091 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cloud/cs | ||
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 @@ | ||
--- | ||
dependencies: | ||
- cs_common |
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 @@ | ||
--- | ||
|
||
- include_tasks: vpc_network_tier.yml |
299 changes: 299 additions & 0 deletions
299
tests/integration/targets/network/tasks/vpc_network_tier.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,299 @@ | ||
--- | ||
- name: setup cleanup vpc network tier | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc: vpc_network_test | ||
state: absent | ||
ignore_errors: true | ||
|
||
- name: setup cleanup existing vpc | ||
ngine_io.cloudstack.vpc: | ||
name: vpc_network_test | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: vpc | ||
- name: verify cleanup existing vpc | ||
assert: | ||
that: | ||
- vpc is successful | ||
|
||
- name: setup vpc | ||
ngine_io.cloudstack.vpc: | ||
name: vpc_network_test | ||
cidr: 10.43.0.0/16 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc_offering: Redundant VPC offering | ||
network_domain: cs2sandbox.simulator.example.com | ||
register: vpc | ||
- name: verify setup vpc | ||
assert: | ||
that: | ||
- vpc is successful | ||
|
||
- name: setup network acl | ||
ngine_io.cloudstack.network_acl: | ||
name: my_network_acl1 | ||
vpc: vpc_network_test | ||
zone: "{{ cs_common_zone_adv }}" | ||
register: acl | ||
- name: verify setup network acl | ||
assert: | ||
that: | ||
- acl is successful | ||
|
||
- name: setup network acl rule | ||
ngine_io.cloudstack.network_acl_rule: | ||
network_acl: my_network_acl1 | ||
rule_position: 1 | ||
vpc: vpc_network_test | ||
traffic_type: ingress | ||
action_policy: allow | ||
port: 80 | ||
cidr: 0.0.0.0/0 | ||
zone: "{{ cs_common_zone_adv }}" | ||
register: acl_rule | ||
- name: verify setup network acl rule | ||
assert: | ||
that: | ||
- acl_rule is successful | ||
|
||
- name: setup vpc network tier | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc: vpc_network_test | ||
state: absent | ||
register: network | ||
- name: verify setup vpc network tier | ||
assert: | ||
that: | ||
- network is successful | ||
|
||
- name: test fail vpc network tier if vpc not given | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
acl: my_network_acl1 | ||
check_mode: true | ||
register: network | ||
ignore_errors: true | ||
- name: verify test fail vpc network tier if vpc not given | ||
assert: | ||
that: | ||
- network is failed | ||
- "network.msg == 'Missing required params: vpc'" | ||
|
||
- name: test create a vpc network tier in check mode | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
check_mode: true | ||
register: network | ||
- name: verify test create a vpc network tier in check mode | ||
assert: | ||
that: | ||
- network is changed | ||
|
||
- name: test create a vpc network tier | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
register: network | ||
- name: verify test create a vpc network tier | ||
assert: | ||
that: | ||
- network is changed | ||
- network.acl_type == 'Account' | ||
- not network.acl | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test create a vpc network tier idempotence | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
register: network | ||
- name: verify test create a vpc network tier idempotence | ||
assert: | ||
that: | ||
- network is not changed | ||
- network.acl_type == 'Account' | ||
- not network.acl | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test update a vpc network tier in check mode | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
display_text: vpc tier 1 description | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
acl: my_network_acl1 | ||
check_mode: true | ||
register: network | ||
- name: verify test update a vpc network tier in check mode | ||
assert: | ||
that: | ||
- network is changed | ||
- network.acl_type == 'Account' | ||
- network.acl == 'my_network_acl1' | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test update a vpc network tier | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
display_text: vpc tier 1 description | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
acl: my_network_acl1 | ||
register: network | ||
- name: verify test update a vpc network tier | ||
assert: | ||
that: | ||
- network is changed | ||
- network.acl_type == 'Account' | ||
- network.acl == 'my_network_acl1' | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1 description' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test update a vpc network tier idempotence | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
display_text: vpc tier 1 description | ||
zone: "{{ cs_common_zone_adv }}" | ||
network_domain: cs2sandbox.simulator.example.com | ||
vpc: vpc_network_test | ||
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks | ||
gateway: 10.43.0.1 | ||
netmask: 255.255.255.0 | ||
acl: my_network_acl1 | ||
register: network | ||
- name: verify test update a vpc network tier idempotence | ||
assert: | ||
that: | ||
- network is not changed | ||
- network.acl_type == 'Account' | ||
- network.acl == 'my_network_acl1' | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1 description' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test absent a vpc network tier in check mode | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc: vpc_network_test | ||
state: absent | ||
register: network | ||
check_mode: true | ||
- name: verify test absent a vpc network tier in check mode | ||
assert: | ||
that: | ||
- network is changed | ||
- network.acl_type == 'Account' | ||
- network.acl == 'my_network_acl1' | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1 description' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test absent a vpc network tier | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc: vpc_network_test | ||
state: absent | ||
register: network | ||
- name: verify test absent a vpc network tier | ||
assert: | ||
that: | ||
- network is changed | ||
- network.acl_type == 'Account' | ||
- network.acl == 'my_network_acl1' | ||
- network.broadcast_domain_type == 'Vlan' | ||
- network.cidr == '10.43.0.0/24' | ||
- network.gateway == '10.43.0.1' | ||
- network.display_text == 'vpc tier 1 description' | ||
- network.network_offering == 'DefaultIsolatedNetworkOfferingForVpcNetworks' | ||
- network.vpc == 'vpc_network_test' | ||
- network.network_domain == 'cs2sandbox.simulator.example.com' | ||
|
||
- name: test absent a vpc network tier idempotence | ||
ngine_io.cloudstack.network: | ||
name: vpc tier 1 | ||
zone: "{{ cs_common_zone_adv }}" | ||
vpc: vpc_network_test | ||
state: absent | ||
register: network | ||
- name: verify test absent a vpc network tier idempotence | ||
assert: | ||
that: | ||
- network is not changed | ||
|
||
- name: cleanup vpc | ||
ngine_io.cloudstack.vpc: | ||
name: vpc_network_test | ||
cidr: 10.43.0.0/16 | ||
zone: "{{ cs_common_zone_adv }}" | ||
state: absent | ||
register: vpc | ||
- name: verify cleanup vpc | ||
assert: | ||
that: | ||
- vpc 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cloud/cs | ||
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 @@ | ||
--- | ||
dependencies: | ||
- cs_common |
Oops, something went wrong.