From 67bb662b9dcaf60efc4db67307c8d672f17f167e Mon Sep 17 00:00:00 2001 From: Joe D'Andrea Date: Mon, 24 Apr 2017 11:09:58 -0400 Subject: [PATCH] Tempest tests for nested stack templates Contains the new Tempest scenario tests for testing the Valet nested template functionality. Change-Id: Ic78a93e65b6613e4dbb3ae59bce158bb1303c826 Story: #2001139 Task: #4861 --- tox.ini | 2 +- .../affinity_1_instance_nested_1_instance.yml | 47 ++ ...affinity_host_multiple_resource_types.yaml | 141 +++++ .../templates/affinity_inner_1_instance.yml | 45 ++ .../templates/affinity_nested_1_instances.yml | 34 ++ .../templates/affinity_nested_2_instances.yml | 43 ++ .../templates/affinity_nested_3_instances.yml | 53 ++ .../affinity_nested_diversity_1_instances.yml | 34 ++ ...ffinity_nested_exclusivity_1_instances.yml | 34 ++ ...ffinity_rack_affinity_rack_1_instances.yml | 43 ++ ...finity_rack_diversity_rack_1_instances.yml | 43 ++ ...finity_rack_diversity_rack_2_instances.yml | 63 ++ ...nity_rack_exclusivity_rack_1_instances.yml | 43 ++ ...nity_rack_exclusivity_rack_2_instances.yml | 63 ++ .../affinity_rack_nested_2_instances.yml | 43 ++ .../affinity_rack_nested_3_instances.yml | 53 ++ ...nity_rack_nested_diversity_1_instances.yml | 34 ++ ...ty_rack_nested_exclusivity_1_instances.yml | 34 ++ ...diversity_1_instance_nested_1_instance.yml | 47 ++ ...iversity_host_multiple_resource_types.yaml | 141 +++++ .../diversity_nested_1_instances.yml | 34 ++ .../diversity_nested_2_instances.yml | 43 ++ ...d_exclusivity_and_affinity_1_instances.yml | 45 ++ ...ersity_rack_diversity_rack_1_instances.yml | 43 ++ ...sity_rack_exclusivity_rack_1_instances.yml | 43 ++ .../diversity_rack_nested_2_instances.yml | 43 ++ ...rsity_rack_nested_affinity_1_instances.yml | 34 ++ ...ty_rack_nested_exclusivity_1_instances.yml | 34 ++ ...d_exclusivity_and_affinity_1_instances.yml | 45 ++ ...lusivity_host_multiple_resource_types.yaml | 141 +++++ .../exclusivity_nested_1_instances.yml | 34 ++ .../exclusivity_nested_2_instances.yml | 43 ++ .../exclusivity_nested_3_instances.yml | 53 ++ ...xclusivity_nested_affinity_2_instances.yml | 43 ++ ...clusivity_nested_diversity_1_instances.yml | 34 ++ ...ted_diversity_and_affinity_1_instances.yml | 45 ++ ...vity_rack_exclusivity_rack_1_instances.yml | 43 ++ .../exclusivity_rack_nested_2_instances.yml | 43 ++ ...ivity_rack_nested_affinity_1_instances.yml | 34 ++ ...ivity_rack_nested_affinity_2_instances.yml | 43 ++ ...sted_affinity_multiple_resource_types.yaml | 209 +++++++ ...vity_rack_nested_diversity_1_instances.yml | 34 ++ ...vity_rack_nested_diversity_2_instances.yml | 43 ++ ...ted_diversity_and_affinity_1_instances.yml | 45 ++ ...ted_diversity_multiple_resource_types.yaml | 209 +++++++ .../templates/inner_affinity_group.yaml | 79 +++ .../templates/inner_diversity_group.yaml | 79 +++ .../templates/inner_exclusivity_group.yaml | 80 +++ .../scenario/templates/inner_server.yaml | 49 ++ .../templates/inner_server_2_groups.yaml | 53 ++ .../nested_affinity_2_instances.yaml | 53 ++ .../nested_diversity_2_instances.yaml | 53 ++ .../nested_exclusivity_2_instances.yaml | 53 ++ .../nested_inner_1_instance_2_groups.yaml | 48 ++ .../nested_inner_1_instance_with_group.yaml | 44 ++ .../templates/nested_inner_2_instances.yaml | 43 ++ .../nested_inner_2_instances_with_group.yaml | 51 ++ .../scenario/templates/std_env_1_flavor.env | 7 + .../scenario/tests/test_nested_templates.py | 540 ++++++++++++++++++ 59 files changed, 3731 insertions(+), 1 deletion(-) create mode 100644 valet/tests/tempest/scenario/templates/affinity_1_instance_nested_1_instance.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_host_multiple_resource_types.yaml create mode 100644 valet/tests/tempest/scenario/templates/affinity_inner_1_instance.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_nested_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_nested_3_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_nested_diversity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_nested_exclusivity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_affinity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_nested_3_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_nested_diversity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/affinity_rack_nested_exclusivity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_1_instance_nested_1_instance.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_host_multiple_resource_types.yaml create mode 100644 valet/tests/tempest/scenario/templates/diversity_nested_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_nested_exclusivity_and_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_diversity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_exclusivity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_nested_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_and_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_host_multiple_resource_types.yaml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_3_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_affinity_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_and_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_exclusivity_rack_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_multiple_resource_types.yaml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_2_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_and_affinity_1_instances.yml create mode 100644 valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_multiple_resource_types.yaml create mode 100644 valet/tests/tempest/scenario/templates/inner_affinity_group.yaml create mode 100644 valet/tests/tempest/scenario/templates/inner_diversity_group.yaml create mode 100644 valet/tests/tempest/scenario/templates/inner_exclusivity_group.yaml create mode 100644 valet/tests/tempest/scenario/templates/inner_server.yaml create mode 100644 valet/tests/tempest/scenario/templates/inner_server_2_groups.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_affinity_2_instances.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_diversity_2_instances.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_exclusivity_2_instances.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_inner_1_instance_2_groups.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_inner_1_instance_with_group.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_inner_2_instances.yaml create mode 100644 valet/tests/tempest/scenario/templates/nested_inner_2_instances_with_group.yaml create mode 100644 valet/tests/tempest/scenario/templates/std_env_1_flavor.env create mode 100644 valet/tests/tempest/scenario/tests/test_nested_templates.py diff --git a/tox.ini b/tox.ini index 4b4a744..c53ad32 100644 --- a/tox.ini +++ b/tox.ini @@ -62,4 +62,4 @@ show-source = true # D203: 1 blank line required before class docstring (deprecated in pep257) ignore = D100,D101,D102,D103,D104,D203 builtins = _ -exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build diff --git a/valet/tests/tempest/scenario/templates/affinity_1_instance_nested_1_instance.yml b/valet/tests/tempest/scenario/templates/affinity_1_instance_nested_1_instance.yml new file mode 100644 index 0000000..04368ea --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_1_instance_nested_1_instance.yml @@ -0,0 +1,47 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: affinity-ins-1 + flavor: { get_param: flavor1 } + image: { get_param: image1 } + networks: + - network: { get_param: network1 } + metadata: + valet: + groups: [ test_affinity_group44 ] + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group44 + diff --git a/valet/tests/tempest/scenario/templates/affinity_host_multiple_resource_types.yaml b/valet/tests/tempest/scenario/templates/affinity_host_multiple_resource_types.yaml new file mode 100644 index 0000000..ed4f1ff --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_host_multiple_resource_types.yaml @@ -0,0 +1,141 @@ +heat_template_version: 2015-04-30 + +description: Template which creates multiple types of non-valet resources. + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + cscf_RSG: + type: OS::Neutron::SecurityGroup + properties: + description: Allow all + name: cscf_RSG + rules: + - { direction: ingress, ethertype: IPv4 } + - { direction: egress, ethertype: IPv4 } + - { direction: ingress, ethertype: IPv6 } + - { direction: egress, ethertype: IPv6 } + + cscf_internal_network_0: + type: OS::Neutron::Net + properties: + name: cscf_internal_network_0 + admin_state_up: True + shared: False + + cscf_internal_subnet_0: + type: OS::Neutron::Subnet + properties: + name: cscf_internal_subnet_0 + ip_version: 4 + network: { get_resource: cscf_internal_network_0 } + cidr: 10.200.212.0/24 + enable_dhcp: False + gateway_ip: null + + oam_internal_0_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_0_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.14 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_0_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_0_port_1 + network: { get_param: network1 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.20 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_0: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_0 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_affinity_group_1 + internal_port1: { get_resource: oam_internal_0_port_0 } + oam_port1: { get_resource: oam_oam_0_port_1 } + + oam_internal_1_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_1_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.15 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_1_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_1_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.21 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_1: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_1 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_affinity_group_1 + internal_port1: { get_resource: oam_internal_1_port_0 } + oam_port1: { get_resource: oam_oam_1_port_1 } + +outputs: + internal_net_id: + description: internal network + value: {get_resource: cscf_internal_network_0} + + cscf_security_group: + description: cscf security group + value: {get_resource: cscf_RSG} + diff --git a/valet/tests/tempest/scenario/templates/affinity_inner_1_instance.yml b/valet/tests/tempest/scenario/templates/affinity_inner_1_instance.yml new file mode 100644 index 0000000..a006b8e --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_inner_1_instance.yml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 1 Instance + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + image2: + type: string + description: 'name of the image 2' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + flavor2: + type: string + description: 'name of the flavor 2' + +resources: + + test-affinity-group1: + type: ATT::Valet::GroupAssignment + properties: + group_type: affinity + level: host + resources: + resource_def: + type: nested_inner_1_instance.yml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + network1: { get_param: network1 } diff --git a/valet/tests/tempest/scenario/templates/affinity_nested_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_nested_1_instances.yml new file mode 100644 index 0000000..e4cd1ee --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_nested_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 1 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group1 + diff --git a/valet/tests/tempest/scenario/templates/affinity_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/affinity_nested_2_instances.yml new file mode 100644 index 0000000..7191cf1 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group2 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group2 diff --git a/valet/tests/tempest/scenario/templates/affinity_nested_3_instances.yml b/valet/tests/tempest/scenario/templates/affinity_nested_3_instances.yml new file mode 100644 index 0000000..4c6d647 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_nested_3_instances.yml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group3 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group3 + + my-instance-3: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group3 diff --git a/valet/tests/tempest/scenario/templates/affinity_nested_diversity_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_nested_diversity_1_instances.yml new file mode 100644 index 0000000..193b3d3 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_nested_diversity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 1 diversity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group7 + group2: test_affinity_group7 diff --git a/valet/tests/tempest/scenario/templates/affinity_nested_exclusivity_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_nested_exclusivity_1_instances.yml new file mode 100644 index 0000000..9912746 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_nested_exclusivity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 1 exclusivity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group9 + group2: test_affinity_group9 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_affinity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_affinity_rack_1_instances.yml new file mode 100644 index 0000000..adaaca4 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_affinity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group37a + + test-affinity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group37b diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_1_instances.yml new file mode 100644 index 0000000..e46a87f --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity and diversity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group38 + + test-diversity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group38 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_2_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_2_instances.yml new file mode 100644 index 0000000..fa2411c --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_diversity_rack_2_instances.yml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity and diversity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group41 + + test-affinity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group41 + + test-diversity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group41 + + test-diversity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-4 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group41 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_1_instances.yml new file mode 100644 index 0000000..0c1e60c --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity and exclusivity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group39 + + test-exclusivity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group39 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_2_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_2_instances.yml new file mode 100644 index 0000000..f019722 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_exclusivity_rack_2_instances.yml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity and exclusivity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group42 + + test-affinity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group42 + + test-exclusivity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group42 + + test-exclusivity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-4 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group42 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_nested_2_instances.yml new file mode 100644 index 0000000..c8a8d01 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group20 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group20 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_nested_3_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_nested_3_instances.yml new file mode 100644 index 0000000..12ac983 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_nested_3_instances.yml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity - 3 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group21 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group21 + + my-instance-3: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-ins-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group21 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_nested_diversity_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_nested_diversity_1_instances.yml new file mode 100644 index 0000000..b65bc59 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_nested_diversity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity - 1 diversity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group26 + group2: test_affinity_group26 diff --git a/valet/tests/tempest/scenario/templates/affinity_rack_nested_exclusivity_1_instances.yml b/valet/tests/tempest/scenario/templates/affinity_rack_nested_exclusivity_1_instances.yml new file mode 100644 index 0000000..ea8c1c3 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/affinity_rack_nested_exclusivity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level affinity - 1 exclusivity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group28 + group2: test_affinity_group28 diff --git a/valet/tests/tempest/scenario/templates/diversity_1_instance_nested_1_instance.yml b/valet/tests/tempest/scenario/templates/diversity_1_instance_nested_1_instance.yml new file mode 100644 index 0000000..c34ee9e --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_1_instance_nested_1_instance.yml @@ -0,0 +1,47 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: diversity-ins-1 + flavor: { get_param: flavor1 } + image: { get_param: image1 } + networks: + - network: { get_param: network1 } + metadata: + valet: + groups: [ test_diversity_group44 ] + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group44 + diff --git a/valet/tests/tempest/scenario/templates/diversity_host_multiple_resource_types.yaml b/valet/tests/tempest/scenario/templates/diversity_host_multiple_resource_types.yaml new file mode 100644 index 0000000..31ac6fe --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_host_multiple_resource_types.yaml @@ -0,0 +1,141 @@ +heat_template_version: 2015-04-30 + +description: Template which creates multiple types of non-valet resources. + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + cscf_RSG: + type: OS::Neutron::SecurityGroup + properties: + description: Allow all + name: cscf_RSG + rules: + - { direction: ingress, ethertype: IPv4 } + - { direction: egress, ethertype: IPv4 } + - { direction: ingress, ethertype: IPv6 } + - { direction: egress, ethertype: IPv6 } + + cscf_internal_network_0: + type: OS::Neutron::Net + properties: + name: cscf_internal_network_0 + admin_state_up: True + shared: False + + cscf_internal_subnet_0: + type: OS::Neutron::Subnet + properties: + name: cscf_internal_subnet_0 + ip_version: 4 + network: { get_resource: cscf_internal_network_0 } + cidr: 10.200.212.0/24 + enable_dhcp: False + gateway_ip: null + + oam_internal_0_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_0_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.14 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_0_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_0_port_1 + network: { get_param: network1 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.20 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_0: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_0 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_diversity_group_1 + internal_port1: { get_resource: oam_internal_0_port_0 } + oam_port1: { get_resource: oam_oam_0_port_1 } + + oam_internal_1_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_1_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.15 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_1_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_1_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.21 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_1: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_1 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_diversity_group_1 + internal_port1: { get_resource: oam_internal_1_port_0 } + oam_port1: { get_resource: oam_oam_1_port_1 } + +outputs: + internal_net_id: + description: internal network + value: {get_resource: cscf_internal_network_0} + + cscf_security_group: + description: cscf security group + value: {get_resource: cscf_RSG} + diff --git a/valet/tests/tempest/scenario/templates/diversity_nested_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_nested_1_instances.yml new file mode 100644 index 0000000..dd3b1cb --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_nested_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 1 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group1 + diff --git a/valet/tests/tempest/scenario/templates/diversity_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/diversity_nested_2_instances.yml new file mode 100644 index 0000000..5c94c37 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group2 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group2 diff --git a/valet/tests/tempest/scenario/templates/diversity_nested_exclusivity_and_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_nested_exclusivity_and_affinity_1_instances.yml new file mode 100644 index 0000000..a191243 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_nested_exclusivity_and_affinity_1_instances.yml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 1 exclusivity and 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group17 + group2: test_diversity_group17 + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group17 + group2: test_diversity_group17 diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_diversity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_diversity_rack_1_instances.yml new file mode 100644 index 0000000..4646066 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_diversity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group37a + + test-diversity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group37b diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_exclusivity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_exclusivity_rack_1_instances.yml new file mode 100644 index 0000000..3298c11 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_exclusivity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity and exclusivity- 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group40 + + test-exclusivity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group40 diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_nested_2_instances.yml new file mode 100644 index 0000000..0601aa0 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group20 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group20 diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_nested_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_nested_affinity_1_instances.yml new file mode 100644 index 0000000..b2378e4 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_nested_affinity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity - 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group30 + group2: test_diversity_group30 diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_1_instances.yml new file mode 100644 index 0000000..562f240 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity - 1 exclusivity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group32 + group2: test_diversity_group32 diff --git a/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_and_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_and_affinity_1_instances.yml new file mode 100644 index 0000000..4b0acc6 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/diversity_rack_nested_exclusivity_and_affinity_1_instances.yml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level diversity - 1 exclusivity and 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group36 + group2: test_diversity_group36 + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group36 + group2: test_diversity_group36 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_host_multiple_resource_types.yaml b/valet/tests/tempest/scenario/templates/exclusivity_host_multiple_resource_types.yaml new file mode 100644 index 0000000..9ed2c4f --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_host_multiple_resource_types.yaml @@ -0,0 +1,141 @@ +heat_template_version: 2015-04-30 + +description: Template which creates multiple types of non-valet resources. + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + cscf_RSG: + type: OS::Neutron::SecurityGroup + properties: + description: Allow all + name: cscf_RSG + rules: + - { direction: ingress, ethertype: IPv4 } + - { direction: egress, ethertype: IPv4 } + - { direction: ingress, ethertype: IPv6 } + - { direction: egress, ethertype: IPv6 } + + cscf_internal_network_0: + type: OS::Neutron::Net + properties: + name: cscf_internal_network_0 + admin_state_up: True + shared: False + + cscf_internal_subnet_0: + type: OS::Neutron::Subnet + properties: + name: cscf_internal_subnet_0 + ip_version: 4 + network: { get_resource: cscf_internal_network_0 } + cidr: 10.200.212.0/24 + enable_dhcp: False + gateway_ip: null + + oam_internal_0_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_0_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.14 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_0_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_0_port_1 + network: { get_param: network1 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.20 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_0: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_0 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_exclusivity_group_1 + internal_port1: { get_resource: oam_internal_0_port_0 } + oam_port1: { get_resource: oam_oam_0_port_1 } + + oam_internal_1_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_1_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.15 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_1_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_1_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.21 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_server_1: + type: inner_server.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_1 + flavor1: { get_param: flavor1 } + image1: { get_param: image1 } + group1: oam_exclusivity_group_1 + internal_port1: { get_resource: oam_internal_1_port_0 } + oam_port1: { get_resource: oam_oam_1_port_1 } + +outputs: + internal_net_id: + description: internal network + value: {get_resource: cscf_internal_network_0} + + cscf_security_group: + description: cscf security group + value: {get_resource: cscf_RSG} + diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_1_instances.yml new file mode 100644 index 0000000..1ac1cdc --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 1 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group1 + diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_2_instances.yml new file mode 100644 index 0000000..1621828 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group2 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group2 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_3_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_3_instances.yml new file mode 100644 index 0000000..50308ed --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_3_instances.yml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group3 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group3 + + my-instance-3: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group3 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_affinity_2_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_affinity_2_instances.yml new file mode 100644 index 0000000..a4681db --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_affinity_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 2 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_affinity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group6a + group2: test_exclusivity_group6 + + test-affinity-group2: + type: nested_affinity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group6b + group2: test_exclusivity_group6 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_1_instances.yml new file mode 100644 index 0000000..f3795eb --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 1 diversity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group4 + group2: test_exclusivity_group4 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_and_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_and_affinity_1_instances.yml new file mode 100644 index 0000000..1bb2bb2 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_nested_diversity_and_affinity_1_instances.yml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 1 diversity and 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group15 + group2: test_exclusivity_group15 + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group15 + group2: test_exclusivity_group15 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_exclusivity_rack_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_exclusivity_rack_1_instances.yml new file mode 100644 index 0000000..3ac0d44 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_exclusivity_rack_1_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 2 groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-exclusivity-group1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group37a + + test-exclusivity-group2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group37b diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_2_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_2_instances.yml new file mode 100644 index 0000000..9e6b155 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 2 Instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group20 + + my-instance-2: + type: nested_inner_1_instance_with_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_exclusivity_group20 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_1_instances.yml new file mode 100644 index 0000000..a30aaa1 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group24 + group2: test_exclusivity_group24 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_2_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_2_instances.yml new file mode 100644 index 0000000..bca4f53 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 2 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-affinity-group1: + type: nested_affinity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group25a + group2: test_exclusivity_group25 + + test-affinity-group2: + type: nested_affinity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group25b + group2: test_exclusivity_group25 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_multiple_resource_types.yaml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_multiple_resource_types.yaml new file mode 100644 index 0000000..783ca6a --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_affinity_multiple_resource_types.yaml @@ -0,0 +1,209 @@ +heat_template_version: 2015-04-30 + +description: Template which creates multiple types of non-valet resources. + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + cscf_RSG: + type: OS::Neutron::SecurityGroup + properties: + description: Allow all + name: cscf_RSG + rules: + - { direction: ingress, ethertype: IPv4 } + - { direction: egress, ethertype: IPv4 } + - { direction: ingress, ethertype: IPv6 } + - { direction: egress, ethertype: IPv6 } + + cscf_internal_network_0: + type: OS::Neutron::Net + properties: + name: cscf_internal_network_0 + admin_state_up: True + shared: False + + cscf_internal_subnet_0: + type: OS::Neutron::Subnet + properties: + name: cscf_internal_subnet_0 + ip_version: 4 + network: { get_resource: cscf_internal_network_0 } + cidr: 10.200.212.0/24 + enable_dhcp: False + gateway_ip: null + + oam_internal_0_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_0_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.14 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_0_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_0_port_1 + network: { get_param: network1 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.20 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_1_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_1_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.15 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_1_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_1_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.21 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_2_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_2_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.16 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_2_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_2_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.22 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_3_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_3_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.17 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_3_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_3_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.23 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_affinity_group_2a: + type: inner_affinity_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_0 + name2: oam_server_1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: oam_affinity_group_2a + group2: oam_exclusivity_group_2 + internal_port1: { get_resource: oam_internal_0_port_0 } + oam_port1: { get_resource: oam_oam_0_port_1 } + internal_port2: { get_resource: oam_internal_1_port_0 } + oam_port2: { get_resource: oam_oam_1_port_1 } + + oam_affinity_group_2b: + type: inner_affinity_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_2 + name2: oam_server_3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: oam_affinity_group_2b + group2: oam_exclusivity_group_2 + internal_port1: { get_resource: oam_internal_2_port_0 } + oam_port1: { get_resource: oam_oam_2_port_1 } + internal_port2: { get_resource: oam_internal_3_port_0 } + oam_port2: { get_resource: oam_oam_3_port_1 } + +outputs: + internal_net_id: + description: internal network + value: {get_resource: cscf_internal_network_0} + + cscf_security_group: + description: cscf security group + value: {get_resource: cscf_RSG} + diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_1_instances.yml new file mode 100644 index 0000000..a0712f4 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_1_instances.yml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 1 diversity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group22 + group2: test_exclusivity_group22 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_2_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_2_instances.yml new file mode 100644 index 0000000..6bf572d --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_2_instances.yml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack exclusivity - 2 diversity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_diversity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group23a + group2: test_exclusivity_group23 + + test-diversity-group2: + type: nested_diversity_2_instances.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group23b + group2: test_exclusivity_group23 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_and_affinity_1_instances.yml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_and_affinity_1_instances.yml new file mode 100644 index 0000000..4d80264 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_and_affinity_1_instances.yml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: Create stack - rack level exclusivity - 1 diversity and 1 affinity groups + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + test-diversity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_diversity_group34 + group2: test_exclusivity_group34 + + test-affinity-group1: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: test-ins-2 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: test_affinity_group34 + group2: test_exclusivity_group34 diff --git a/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_multiple_resource_types.yaml b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_multiple_resource_types.yaml new file mode 100644 index 0000000..3329eac --- /dev/null +++ b/valet/tests/tempest/scenario/templates/exclusivity_rack_nested_diversity_multiple_resource_types.yaml @@ -0,0 +1,209 @@ +heat_template_version: 2015-04-30 + +description: Template which creates multiple types of non-valet resources. + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + cscf_RSG: + type: OS::Neutron::SecurityGroup + properties: + description: Allow all + name: cscf_RSG + rules: + - { direction: ingress, ethertype: IPv4 } + - { direction: egress, ethertype: IPv4 } + - { direction: ingress, ethertype: IPv6 } + - { direction: egress, ethertype: IPv6 } + + cscf_internal_network_0: + type: OS::Neutron::Net + properties: + name: cscf_internal_network_0 + admin_state_up: True + shared: False + + cscf_internal_subnet_0: + type: OS::Neutron::Subnet + properties: + name: cscf_internal_subnet_0 + ip_version: 4 + network: { get_resource: cscf_internal_network_0 } + cidr: 10.200.212.0/24 + enable_dhcp: False + gateway_ip: null + + oam_internal_0_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_0_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.14 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_0_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_0_port_1 + network: { get_param: network1 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.20 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_1_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_1_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.15 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_1_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_1_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.21 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_2_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_2_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.16 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_2_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_2_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.22 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_internal_3_port_0: + type: OS::Neutron::Port + depends_on: + - cscf_internal_subnet_0 + properties: + name: oam_internal_3_port_0 + network: { get_resource: cscf_internal_network_0 } + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.200.212.17 + allowed_address_pairs: + - ip_address: "0.0.0.0/1" + - ip_address: "128.0.0.0/1" + - ip_address: "::/1" + - ip_address: "8000::/1" + + oam_oam_3_port_1: + type: OS::Neutron::Port + properties: + name: oam_oam_3_port_1 + network: {get_param: network1} + security_groups: + - { get_resource: cscf_RSG } + fixed_ips: + - ip_address: 10.100.1.23 + allowed_address_pairs: + - ip_address: 10.100.1.7 + + oam_diversity_group_3a: + type: inner_diversity_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_0 + name2: oam_server_1 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: oam_diversity_group_3a + group2: oam_exclusivity_group_3 + internal_port1: { get_resource: oam_internal_0_port_0 } + oam_port1: { get_resource: oam_oam_0_port_1 } + internal_port2: { get_resource: oam_internal_1_port_0 } + oam_port2: { get_resource: oam_oam_1_port_1 } + + oam_diversity_group_3b: + type: inner_diversity_group.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: oam_server_2 + name2: oam_server_3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: oam_diversity_group_3b + group2: oam_exclusivity_group_3 + internal_port1: { get_resource: oam_internal_2_port_0 } + oam_port1: { get_resource: oam_oam_2_port_1 } + internal_port2: { get_resource: oam_internal_3_port_0 } + oam_port2: { get_resource: oam_oam_3_port_1 } + +outputs: + internal_net_id: + description: internal network + value: {get_resource: cscf_internal_network_0} + + cscf_security_group: + description: cscf security group + value: {get_resource: cscf_RSG} + diff --git a/valet/tests/tempest/scenario/templates/inner_affinity_group.yaml b/valet/tests/tempest/scenario/templates/inner_affinity_group.yaml new file mode 100644 index 0000000..586da94 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/inner_affinity_group.yaml @@ -0,0 +1,79 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name of the instance 1' + + name2: + type: string + description: 'name of the instance 2' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + internal_port1: + type: string + description: 'internal port 1' + + oam_port1: + type: string + description: 'oam port 1' + + internal_port2: + type: string + description: 'internal port 2' + + oam_port2: + type: string + description: 'oam port 2' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + oam_server_0: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name1 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port1 } + oam_port1: { get_param: oam_port1 } + + oam_server_1: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name2 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port2 } + oam_port1: { get_param: oam_port2 } diff --git a/valet/tests/tempest/scenario/templates/inner_diversity_group.yaml b/valet/tests/tempest/scenario/templates/inner_diversity_group.yaml new file mode 100644 index 0000000..c407d68 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/inner_diversity_group.yaml @@ -0,0 +1,79 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name of the instance 1' + + name2: + type: string + description: 'name of the instance 2' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + internal_port1: + type: string + description: 'internal port 1' + + oam_port1: + type: string + description: 'oam port 1' + + internal_port2: + type: string + description: 'internal port 2' + + oam_port2: + type: string + description: 'oam port 2' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + oam_server_0: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name1 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port1 } + oam_port1: { get_param: oam_port1 } + + oam_server_1: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name2 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port2 } + oam_port1: { get_param: oam_port2 } diff --git a/valet/tests/tempest/scenario/templates/inner_exclusivity_group.yaml b/valet/tests/tempest/scenario/templates/inner_exclusivity_group.yaml new file mode 100644 index 0000000..97c78bb --- /dev/null +++ b/valet/tests/tempest/scenario/templates/inner_exclusivity_group.yaml @@ -0,0 +1,80 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name of the instance 1' + + name2: + type: string + description: 'name of the instance 2' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + internal_port1: + type: string + description: 'internal port 1' + + oam_port1: + type: string + description: 'oam port 1' + + internal_port2: + type: string + description: 'internal port 2' + + oam_port2: + type: string + description: 'oam port 2' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + oam_server_0: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name1 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port1 } + oam_port1: { get_param: oam_port1 } + + oam_server_1: + type: inner_server_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: { get_param: name2 } + image1: { get_param: image1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + internal_port1: { get_param: internal_port2 } + oam_port1: { get_param: oam_port2 } + diff --git a/valet/tests/tempest/scenario/templates/inner_server.yaml b/valet/tests/tempest/scenario/templates/inner_server.yaml new file mode 100644 index 0000000..346bb47 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/inner_server.yaml @@ -0,0 +1,49 @@ +heat_template_version: 2015-04-30 + +description: Create oam port + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name of the instance 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + image1: + type: string + description: 'name of the image 1' + + internal_port1: + type: string + description: 'internal port 1' + + oam_port1: + type: string + description: 'oam port 1' + + group1: + type: string + description: 'name of the group 1' + +resources: + + oam_server: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name1 } + flavor: { get_param: flavor1 } + image: { get_param: image1 } + networks: + - port: { get_param: internal_port1 } + - port: { get_param: oam_port1 } + metadata: + valet: + groups: [ get_param: group1 ] diff --git a/valet/tests/tempest/scenario/templates/inner_server_2_groups.yaml b/valet/tests/tempest/scenario/templates/inner_server_2_groups.yaml new file mode 100644 index 0000000..a42246f --- /dev/null +++ b/valet/tests/tempest/scenario/templates/inner_server_2_groups.yaml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create oam port + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name of the instance 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + image1: + type: string + description: 'name of the image 1' + + internal_port1: + type: string + description: 'internal port 1' + + oam_port1: + type: string + description: 'oam port 1' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + oam_server: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name1 } + flavor: { get_param: flavor1 } + image: { get_param: image1 } + networks: + - port: { get_param: internal_port1 } + - port: { get_param: oam_port1 } + metadata: + valet: + groups: [ get_param: group1, get_param: group2 ] diff --git a/valet/tests/tempest/scenario/templates/nested_affinity_2_instances.yaml b/valet/tests/tempest/scenario/templates/nested_affinity_2_instances.yaml new file mode 100644 index 0000000..ccd0c4b --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_affinity_2_instances.yaml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level affinity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + my-instance-3: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-test-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + + my-instance-4: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: affinity-test-4 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } diff --git a/valet/tests/tempest/scenario/templates/nested_diversity_2_instances.yaml b/valet/tests/tempest/scenario/templates/nested_diversity_2_instances.yaml new file mode 100644 index 0000000..15453dd --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_diversity_2_instances.yaml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level diversity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + my-instance-3: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-test-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + + my-instance-4: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: diversity-test-4 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } diff --git a/valet/tests/tempest/scenario/templates/nested_exclusivity_2_instances.yaml b/valet/tests/tempest/scenario/templates/nested_exclusivity_2_instances.yaml new file mode 100644 index 0000000..3dd08e4 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_exclusivity_2_instances.yaml @@ -0,0 +1,53 @@ +heat_template_version: 2015-04-30 + +description: Create stack - host level exclusivity - 2 instances + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + my-instance-3: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-test-3 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } + + my-instance-4: + type: nested_inner_1_instance_2_groups.yaml + properties: + avail-zone1: { get_param: avail-zone1 } + name1: exclusivity-test-4 + image1: { get_param: image1 } + network1: { get_param: network1 } + flavor1: { get_param: flavor1 } + group1: { get_param: group1 } + group2: { get_param: group2 } diff --git a/valet/tests/tempest/scenario/templates/nested_inner_1_instance_2_groups.yaml b/valet/tests/tempest/scenario/templates/nested_inner_1_instance_2_groups.yaml new file mode 100644 index 0000000..73af2cd --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_inner_1_instance_2_groups.yaml @@ -0,0 +1,48 @@ +heat_template_version: 2015-04-30 + +description: Create a single nova server + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + group1: + type: string + description: 'name of the group 1' + + group2: + type: string + description: 'name of the group 2' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name1 } + image: { get_param: image1 } + flavor: { get_param: flavor1 } + networks: + - network: { get_param: network1 } + metadata: + valet: + groups: [ get_param: group1, get_param: group2 ] diff --git a/valet/tests/tempest/scenario/templates/nested_inner_1_instance_with_group.yaml b/valet/tests/tempest/scenario/templates/nested_inner_1_instance_with_group.yaml new file mode 100644 index 0000000..b3bd690 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_inner_1_instance_with_group.yaml @@ -0,0 +1,44 @@ +heat_template_version: 2015-04-30 + +description: Create a single nova server + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + group1: + type: string + description: 'name of the group 1' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name1 } + image: { get_param: image1 } + flavor: { get_param: flavor1 } + networks: + - network: { get_param: network1 } + metadata: + valet: + groups: [ get_param: group1 ] diff --git a/valet/tests/tempest/scenario/templates/nested_inner_2_instances.yaml b/valet/tests/tempest/scenario/templates/nested_inner_2_instances.yaml new file mode 100644 index 0000000..25f59a8 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_inner_2_instances.yaml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +description: Create a single nova server + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + + flavor2: + type: string + description: 'name of the flavor 2' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: inner-1 + image: { get_param: image1 } + flavor: { get_param: flavor1 } + networks: + - network: { get_param: network1 } + + my-instance-2: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: inner-2 diff --git a/valet/tests/tempest/scenario/templates/nested_inner_2_instances_with_group.yaml b/valet/tests/tempest/scenario/templates/nested_inner_2_instances_with_group.yaml new file mode 100644 index 0000000..537707e --- /dev/null +++ b/valet/tests/tempest/scenario/templates/nested_inner_2_instances_with_group.yaml @@ -0,0 +1,51 @@ +heat_template_version: 2015-04-30 + +description: Create a single nova server + +parameters: + + avail-zone1: + type: string + description: 'availability zone 1' + + name1: + type: string + description: 'name 1' + + name2: + type: string + description: 'name 2' + + image1: + type: string + description: 'name of the image 1' + + network1: + type: string + description: 'name of the network 1' + + flavor1: + type: string + description: 'name of the flavor 1' + +resources: + + my-instance-1: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name1 } + image: { get_param: image1 } + flavor: { get_param: flavor1 } + networks: + - network: { get_param: network1 } + + my-instance-2: + type: OS::Nova::Server + properties: + availability_zone: { get_param: avail-zone1 } + name: { get_param: name2 } + image: { get_param: image1 } + flavor: { get_param: flavor1 } + networks: + - network: { get_param: network1 } diff --git a/valet/tests/tempest/scenario/templates/std_env_1_flavor.env b/valet/tests/tempest/scenario/templates/std_env_1_flavor.env new file mode 100644 index 0000000..7e08851 --- /dev/null +++ b/valet/tests/tempest/scenario/templates/std_env_1_flavor.env @@ -0,0 +1,7 @@ + +parameters: + avail-zone1: nova + image1: TestVM + network1: admin_floating_net + flavor1: m1.tiny + diff --git a/valet/tests/tempest/scenario/tests/test_nested_templates.py b/valet/tests/tempest/scenario/tests/test_nested_templates.py new file mode 100644 index 0000000..bdb058d --- /dev/null +++ b/valet/tests/tempest/scenario/tests/test_nested_templates.py @@ -0,0 +1,540 @@ +# +# Copyright 2014-2017 AT&T Intellectual Property +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from tempest import test +from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase + + +class TestNestedStackTemplates(ScenarioTestCase): + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00000') + def test_affinity_nested_one_instances(self): + self.create_valet_group("test_affinity_group1", 'host', 'affinity') + template_file = "/templates/affinity_nested_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_nested_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00001') + def test_diversity_nested_one_instances(self): + self.create_valet_group("test_diversity_group1", 'host', 'diversity') + template_file = "/templates/diversity_nested_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_nested_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00002') + def test_exclusivity_nested_one_instances(self): + self.create_valet_group("test_exclusivity_group1", 'host', + 'exclusivity') + template_file = "/templates/exclusivity_nested_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00003') + def test_affinity_nested_two_instances(self): + self.create_valet_group("test_affinity_group2", 'host', 'affinity') + template_file = "/templates/affinity_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00004') + def test_diversity_nested_two_instances(self): + self.create_valet_group("test_diversity_group2", 'host', 'diversity') + template_file = "/templates/diversity_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00005') + def test_exclusivity_nested_two_instances(self): + self.create_valet_group("test_exclusivity_group2", 'host', + 'exclusivity') + template_file = "/templates/exclusivity_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00006') + def test_affinity_nested_three_instances(self): + self.create_valet_group("test_affinity_group3", 'host', 'affinity') + template_file = "/templates/affinity_nested_3_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_nested_three_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00007') + def test_exclusivity_nested_three_instances(self): + self.create_valet_group("test_exclusivity_group3", 'host', + 'exclusivity') + template_file = "/templates/exclusivity_nested_3_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_three_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00008') + def test_exclusivity_nested_diversity_one_instances(self): + self.create_valet_group("test_exclusivity_group4", 'host', + 'exclusivity') + self.create_valet_group("test_diversity_group4", 'host', 'diversity') + template_file = \ + "/templates/exclusivity_nested_diversity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_diversity_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host'], + ['exclusivity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00009') + def test_exclusivity_nested_diversity_two_instances(self): + self.create_valet_group("test_exclusivity_group5", 'host', + 'exclusivity') + self.create_valet_group("test_diversity_group5a", 'host', 'diversity') + self.create_valet_group("test_diversity_group5b", 'host', 'diversity') + template_file = \ + "/templates/exclusivity_nested_diversity_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_diversity_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host', 'host'], + ['exclusivity', 'diversity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000a') + def test_exclusivity_nested_affinity_two_instances(self): + self.create_valet_group("test_exclusivity_group6", 'host', + 'exclusivity') + self.create_valet_group("test_affinity_group6a", 'host', 'affinity') + self.create_valet_group("test_affinity_group6b", 'host', 'affinity') + template_file = \ + "/templates/exclusivity_nested_affinity_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_affinity_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host', 'host'], + ['exclusivity', 'affinity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000b') + def test_affinity_nested_diversity_one_instances(self): + self.create_valet_group("test_affinity_group7", 'host', 'affinity') + self.create_valet_group("test_diversity_group7", 'host', 'diversity') + template_file = "/templates/affinity_nested_diversity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_nested_diversity_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host'], + ['affinity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000c') + def test_affinity_nested_exclusivity_one_instances(self): + self.create_valet_group("test_affinity_group9", 'host', 'affinity') + self.create_valet_group("test_exclusivity_group9", 'host', + 'exclusivity') + template_file = \ + "/templates/affinity_nested_exclusivity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_nested_exclusivity_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host'], + ['affinity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000d') + def test_exclusivity_nested_diversity_and_affinity_one_instances(self): + self.create_valet_group("test_exclusivity_group15", 'host', + 'exclusivity') + self.create_valet_group("test_diversity_group15", 'host', 'diversity') + self.create_valet_group("test_affinity_group15", 'host', 'affinity') + template_file = \ + "/templates/" \ + "exclusivity_nested_diversity_and_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_nested_diversity_and_affinity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host', 'host'], + ['exclusivity', 'diversity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000e') + def test_diversity_nested_exclusivity_and_affinity_one_instances(self): + self.create_valet_group("test_diversity_group17", 'host', 'diversity') + self.create_valet_group("test_exclusivity_group17", 'host', + 'exclusivity') + self.create_valet_group("test_affinity_group17", 'host', 'affinity') + template_file = \ + "/templates/" \ + "diversity_nested_exclusivity_and_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_nested_exclusivity_and_affinity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host', 'host', 'host'], + ['diversity', 'exclusivity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0000f') + def test_rack_affinity_nested_two_instances(self): + self.create_valet_group("test_affinity_group20", 'rack', 'affinity') + template_file = "/templates/affinity_rack_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00010') + def test_rack_diversity_nested_two_instances(self): + self.create_valet_group("test_diversity_group20", 'rack', 'diversity') + template_file = "/templates/diversity_rack_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_rack_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack'], ['diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00011') + def test_rack_exclusivity_nested_two_instances(self): + self.create_valet_group("test_exclusivity_group20", 'rack', + 'exclusivity') + template_file = "/templates/exclusivity_rack_nested_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack'], ['exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00012') + def test_rack_affinity_nested_three_instances(self): + self.create_valet_group("test_affinity_group21", 'rack', 'affinity') + template_file = "/templates/affinity_rack_nested_3_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_nested_three_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00013') + def test_rack_exclusivity_nested_diversity_one_instances(self): + self.create_valet_group("test_exclusivity_group22", 'rack', + 'exclusivity') + self.create_valet_group("test_diversity_group22", 'host', 'diversity') + template_file = \ + "/templates/exclusivity_rack_nested_diversity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_diversity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['exclusivity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00014') + def test_rack_exclusivity_nested_diversity_two_instances(self): + self.create_valet_group("test_exclusivity_group23", 'rack', + 'exclusivity') + self.create_valet_group("test_diversity_group23a", 'host', 'diversity') + self.create_valet_group("test_diversity_group23b", 'host', 'diversity') + template_file = \ + "/templates/exclusivity_rack_nested_diversity_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_diversity_two_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['exclusivity', 'diversity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00015') + def test_rack_exclusivity_nested_affinity_one_instances(self): + self.create_valet_group("test_exclusivity_group24", 'rack', + 'exclusivity') + self.create_valet_group("test_affinity_group24", 'host', 'affinity') + template_file = \ + "/templates/exclusivity_rack_nested_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_affinity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['exclusivity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00016') + def test_rack_exclusivity_nested_affinity_two_instances(self): + self.create_valet_group("test_exclusivity_group25", 'rack', + 'exclusivity') + self.create_valet_group("test_affinity_group25a", 'host', 'affinity') + self.create_valet_group("test_affinity_group25b", 'host', 'affinity') + template_file = \ + "/templates/exclusivity_rack_nested_affinity_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_affinity_two_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['exclusivity', 'affinity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00017') + def test_rack_affinity_nested_diversity_one_instances(self): + self.create_valet_group("test_affinity_group26", 'rack', 'affinity') + self.create_valet_group("test_diversity_group26", 'host', 'diversity') + template_file = \ + "/templates/affinity_rack_nested_diversity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_nested_diversity_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['affinity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00018') + def test_rack_affinity_nested_exclusivity_one_instances(self): + self.create_valet_group("test_affinity_group28", 'rack', 'affinity') + self.create_valet_group("test_exclusivity_group28", 'host', + 'exclusivity') + template_file = \ + "/templates/affinity_rack_nested_exclusivity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_nested_exclusivity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['affinity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00019') + def test_rack_diversity_nested_affinity_one_instances(self): + self.create_valet_group("test_diversity_group30", 'rack', 'diversity') + self.create_valet_group("test_affinity_group30", 'host', 'affinity') + template_file = \ + "/templates/diversity_rack_nested_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_rack_nested_affinity_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['diversity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001a') + def test_rack_diversity_nested_exclusivity_one_instances(self): + self.create_valet_group("test_diversity_group32", 'rack', 'diversity') + self.create_valet_group("test_exclusivity_group32", 'host', + 'exclusivity') + template_file = \ + "/templates/diversity_rack_nested_exclusivity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_rack_nested_exclusivity_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host'], + ['diversity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001b') + def test_rack_exclusivity_nested_diversity_and_affinity_one_instance(self): + self.create_valet_group("test_exclusivity_group34", 'rack', + 'exclusivity') + self.create_valet_group("test_diversity_group34", 'host', 'diversity') + self.create_valet_group("test_affinity_group34", 'host', 'affinity') + template_file = \ + "/templates/" \ + "exclusivity_rack_nested_diversity_and_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_diversity_and_affinity_one_instance", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['exclusivity', 'diversity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001c') + def test_rack_diversity_nested_exclusivity_and_affinity_one_instance(self): + self.create_valet_group("test_diversity_group36", 'rack', 'diversity') + self.create_valet_group("test_exclusivity_group36", 'host', + 'exclusivity') + self.create_valet_group("test_affinity_group36", 'host', 'affinity') + template_file = \ + "/templates/" \ + "diversity_rack_nested_exclusivity_and_affinity_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_rack_nested_exclusivity_and_affinity_one_instance", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['diversity', 'exclusivity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001d') + def test_host_exclusivity_multiple_resource_types(self): + self.create_valet_group("oam_exclusivity_group_1", 'host', + 'exclusivity') + template_file = \ + "/templates/exclusivity_host_multiple_resource_types.yaml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_host_multiple_resource_types", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001e') + def test_host_affinity_multiple_resource_types(self): + self.create_valet_group("oam_affinity_group_1", 'host', 'affinity') + template_file = "/templates/affinity_host_multiple_resource_types.yaml" + stack_id, stack_name = self.create_stack( + "test_affinity_host_multiple_resource_types", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0001f') + def test_host_diversity_multiple_resource_types(self): + self.create_valet_group("oam_diversity_group_1", 'host', 'diversity') + template_file = \ + "/templates/diversity_host_multiple_resource_types.yaml" + stack_id, stack_name = self.create_stack( + "test_diversity_host_multiple_resource_types", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00020') + def test_rack_exclusivity_nested_affinity_multiple_resource_types(self): + self.create_valet_group("oam_exclusivity_group_2", 'rack', + 'exclusivity') + self.create_valet_group("oam_affinity_group_2a", 'host', 'affinity') + self.create_valet_group("oam_affinity_group_2b", 'host', 'affinity') + template_file = \ + "/templates/" \ + "exclusivity_rack_nested_affinity_multiple_resource_types.yaml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_affinity_multiple_resource_types", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['exclusivity', 'affinity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00021') + def test_rack_exclusivity_nested_diversity_multiple_resource_types(self): + self.create_valet_group("oam_exclusivity_group_3", 'rack', + 'exclusivity') + self.create_valet_group("oam_diversity_group_3a", 'host', 'diversity') + self.create_valet_group("oam_diversity_group_3b", 'host', 'diversity') + template_file = \ + "/templates/" \ + "exclusivity_rack_nested_diversity_multiple_resource_types.yaml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_nested_diversity_multiple_resource_types", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'host', 'host'], + ['exclusivity', 'diversity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00024') + def test_rack_rack_affinity_one_instances(self): + self.create_valet_group("test_affinity_group37a", 'rack', 'affinity') + self.create_valet_group("test_affinity_group37b", 'rack', 'affinity') + template_file = \ + "/templates/affinity_rack_affinity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_affinity_rack_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['affinity', 'affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00025') + def test_rack_rack_diversity_one_instances(self): + self.create_valet_group("test_diversity_group37a", 'rack', 'diversity') + self.create_valet_group("test_diversity_group37b", 'rack', 'diversity') + template_file = \ + "/templates/diversity_rack_diversity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diveristy_rack_diversity_rack_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['diversity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00026') + def test_rack_rack_exclusivity_one_instances(self): + self.create_valet_group("test_exclusivity_group37a", 'rack', + 'exclusivity') + self.create_valet_group("test_exclusivity_group37b", 'rack', + 'exclusivity') + template_file = \ + "/templates/exclusivity_rack_exclusivity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_exclusivity_rack_exclusivity_rack_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['exclusivity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00027') + def test_rack_affinity_rack_diversity_one_instances(self): + self.create_valet_group("test_affinity_group38", 'rack', 'affinity') + self.create_valet_group("test_diversity_group38", 'rack', 'diversity') + template_file = \ + "/templates/affinity_rack_diversity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_diversity_rack_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['affinity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00028') + def test_rack_affinity_rack_exclusivity_one_instances(self): + self.create_valet_group("test_affinity_group39", 'rack', 'affinity') + self.create_valet_group("test_exclusivity_group39", 'rack', + 'exclusivity') + template_file = \ + "/templates/affinity_rack_exclusivity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_exclusivity_rack_one_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['affinity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a00029') + def test_rack_diversity_rack_exclusivity_one_instances(self): + self.create_valet_group("test_diversity_group40", 'rack', 'diversity') + self.create_valet_group("test_exclusivity_group40", 'rack', + 'exclusivity') + template_file = \ + "/templates/diversity_rack_exclusivity_rack_1_instances.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_rack_exclusivity_rack_one_instances", + template_file, "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['diversity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0002a') + def test_rack_affinity_rack_diversity_two_instances(self): + self.create_valet_group("test_affinity_group41", 'rack', 'affinity') + self.create_valet_group("test_diversity_group41", 'rack', 'diversity') + template_file = \ + "/templates/affinity_rack_diversity_rack_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_diversity_rack_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['affinity', 'diversity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0002b') + def test_rack_affinity_rack_exclusivity_two_instances(self): + self.create_valet_group("test_affinity_group42", 'rack', 'affinity') + self.create_valet_group("test_exclusivity_group42", 'rack', + 'exclusivity') + template_file = \ + "/templates/affinity_rack_exclusivity_rack_2_instances.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_rack_exclusivity_rack_two_instances", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['rack', 'rack'], + ['affinity', 'exclusivity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0002c') + def test_affinity_one_instance_nested_one_instance(self): + self.create_valet_group("test_affinity_group44", 'host', 'affinity') + template_file = "/templates/affinity_1_instance_nested_1_instance.yml" + stack_id, stack_name = self.create_stack( + "test_affinity_one_instance_nested_one_instance", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['affinity']) + + @test.idempotent_id('f61b522b-b84d-458d-b45b-f07f19a0002d') + def test_diversity_one_instance_nested_one_instance(self): + self.create_valet_group("test_diversity_group44", 'host', 'diversity') + template_file = "/templates/diversity_1_instance_nested_1_instance.yml" + stack_id, stack_name = self.create_stack( + "test_diversity_one_instance_nested_one_instance", template_file, + "/templates/std_env_1_flavor.env") + self.check_stack(stack_id, template_file, ['host'], ['diversity'])