diff options
Diffstat (limited to 'snaps/openstack/tests/heat/floating_ip_heat_template.yaml')
-rw-r--r-- | snaps/openstack/tests/heat/floating_ip_heat_template.yaml | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/snaps/openstack/tests/heat/floating_ip_heat_template.yaml b/snaps/openstack/tests/heat/floating_ip_heat_template.yaml index e09515e..e64c7fc 100644 --- a/snaps/openstack/tests/heat/floating_ip_heat_template.yaml +++ b/snaps/openstack/tests/heat/floating_ip_heat_template.yaml @@ -41,6 +41,10 @@ parameters: label: Instance Flavor for second VM description: Flavor name for the second instance default: m1.med + flavor_extra_specs: + type: json + description: Instance Flavor extra specs + default: {} net_name: type: string label: Test network name @@ -61,6 +65,11 @@ parameters: label: Keypair name description: The name of the stack's keypair default: keypair_name + security_group_name: + type: string + label: Security Group name + description: The name of the stack's security group + default: security_group_name inst1_name: type: string label: First VM name @@ -83,12 +92,14 @@ resources: ram: 1024 vcpus: 2 disk: 2 + extra_specs: { get_param: flavor_extra_specs } flavor2: type: OS::Nova::Flavor properties: ram: 1024 vcpus: 2 disk: 2 + extra_specs: { get_param: flavor_extra_specs } network: type: OS::Neutron::Net @@ -116,16 +127,29 @@ resources: router: { get_resource: management_router } subnet: { get_resource: subnet } + server_security_group: + type: OS::Neutron::SecurityGroup + properties: + description: Add security group rules for server + name: { get_param: security_group_name } + rules: + - remote_ip_prefix: 0.0.0.0/0 + protocol: tcp + port_range_min: 22 + port_range_max: 22 + - remote_ip_prefix: 0.0.0.0/0 + protocol: icmp + floating_ip: type: OS::Neutron::FloatingIP properties: floating_network: { get_param: external_net_name } floating_ip_association: - type: OS::Nova::FloatingIPAssociation + type: OS::Neutron::FloatingIPAssociation properties: - floating_ip: { get_resource: floating_ip } - server_id: {get_resource: vm1} + floatingip_id: { get_resource: floating_ip } + port_id: {get_resource: port1} keypair: type: OS::Nova::KeyPair @@ -133,20 +157,28 @@ resources: name: { get_param: keypair_name } save_private_key: True + port1: + type: OS::Neutron::Port + properties: + network: { get_resource: network } + security_groups: [{ get_resource: server_security_group }] + fixed_ips: + - subnet_id: { get_resource: subnet } + vm1: type: OS::Nova::Server - depends_on: [subnet, keypair, flavor1] + depends_on: [subnet, keypair, flavor1, port1] properties: name: { get_param: inst1_name } image: { get_param: image1_name } flavor: { get_resource: flavor1 } key_name: {get_resource: keypair} networks: - - network: { get_resource: network } + - port: { get_resource: port1 } vm2: type: OS::Nova::Server - depends_on: [subnet, flavor2] + depends_on: [subnet, keypair, flavor2] properties: name: { get_param: inst2_name } image: { get_param: image2_name } |