From 2468ef5f71cee50424d21b5633bfa0e8d9588c1f Mon Sep 17 00:00:00 2001 From: abregman Date: Wed, 15 Aug 2018 11:17:23 +0300 Subject: [PATCH] Add heat template for creating the stack This stack will be shared by all the tests we'll create. Also added a README. Change-Id: I53e5aa573e462babaa559d5d7c736b6cc04315a7 --- README.rst | 11 +++ tobiko/tests/scenario/templates/fip.yaml | 85 ++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 README.rst create mode 100644 tobiko/tests/scenario/templates/fip.yaml diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..0db4b1108 --- /dev/null +++ b/README.rst @@ -0,0 +1,11 @@ +====== +Tobiko +====== + +To run pre-upgrade tests: + + tempest run --regex pre + +To run post-upgrade tests: + + tempest run --regex post diff --git a/tobiko/tests/scenario/templates/fip.yaml b/tobiko/tests/scenario/templates/fip.yaml new file mode 100644 index 000000000..abec165a7 --- /dev/null +++ b/tobiko/tests/scenario/templates/fip.yaml @@ -0,0 +1,85 @@ +heat_template_version: 2013-05-23 + +description: | + Template to create an instance and check connectivity to it + +parameters: + flavor: + type: string + image: + type: string + subnet_cidr: + type: string + default: 190.40.2.0/24 + public_net: + type: string + default: public + private_net: + type: string + default: heat-net + dns_servers: + type: comma_delimited_list + default: ["8.8.8.8", "8.8.4.4"] + +resources: + sg: + type: OS::Neutron::SecurityGroup + properties: + name: sg + description: Security group to allow ICMP and SSH + rules: + - protocol: icmp + - protocol: tcp + port_range_min: 22 + port_range_max: 22 + + floating_ip: + type: OS::Neutron::FloatingIP + properties: + floating_network: {get_param: public_net} + + network: + type: OS::Neutron::Net + + subnet: + type: OS::Neutron::Subnet + properties: + network: {get_resource: network} + ip_version: 4 + cidr: {get_param: subnet_cidr} + dns_nameservers: {get_param: dns_servers} + + router: + type: OS::Neutron::Router + properties: + external_gateway_info: + network: {get_param: public_net} + + router_interface: + type: OS::Neutron::RouterInterface + properties: + router: {get_resource: router} + subnet: {get_resource: subnet} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + server: + type: OS::Nova::Server + properties: + image: {get_param: image} + flavor: {get_param: flavor} + networks: + - subnet: {get_resource: subnet} + security_groups: + - {get_resource: sg} + + server_floating_ip_assoc: + type: OS::Neutron::FloatingIPAssociation + properties: + floatingip_id: {get_resource: floating_ip} + port_id: {get_attr: [server, addresses, {get_resource: network}, 0, port]} + +outputs: + server_ip: + value: {get_attr: [floating_ip, floating_ip_address]}