summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-01-30 12:56:20 -0700
committerspisarski <s.pisarski@cablelabs.com>2018-01-30 12:56:20 -0700
commitae14510fbc5facbd0bbca7c8d51ddf3d73c7d77e (patch)
treefc3b183e92f20b7c26009324746d77ded420157f
parent0cb9752f2cafb4abc7a5df969becb86ce34d6aa7 (diff)
Changed network and keypair naming to be dynamic
Change-Id: I227433e92fc7f42924fa9404ff3c394c79500a1b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/openstack/tests/create_stack_tests.py2
-rw-r--r--snaps/openstack/tests/heat/agent-group.yaml8
-rw-r--r--snaps/openstack/tests/heat/agent.yaml1
3 files changed, 8 insertions, 3 deletions
diff --git a/snaps/openstack/tests/create_stack_tests.py b/snaps/openstack/tests/create_stack_tests.py
index 6041735..7155a29 100644
--- a/snaps/openstack/tests/create_stack_tests.py
+++ b/snaps/openstack/tests/create_stack_tests.py
@@ -536,9 +536,11 @@ class CreateStackNestedResourceTests(OSIntegrationTestCase):
self.flavor_creator.create()
env_values = {
+ 'network_name': self.guid + '-network',
'public_network': self.ext_net_name,
'agent_image': self.image_creator.image_settings.name,
'agent_flavor': self.flavor_creator.flavor_settings.name,
+ 'key_name': self.guid + '-key',
}
heat_tmplt_path = pkg_resources.resource_filename(
diff --git a/snaps/openstack/tests/heat/agent-group.yaml b/snaps/openstack/tests/heat/agent-group.yaml
index 540ea93..4b97495 100644
--- a/snaps/openstack/tests/heat/agent-group.yaml
+++ b/snaps/openstack/tests/heat/agent-group.yaml
@@ -41,6 +41,10 @@ parameters:
availability_zone:
type: string
default: nova
+ network_name:
+ type: string
+ key_name:
+ type: string
resources:
slaves:
@@ -66,7 +70,7 @@ resources:
network:
type: OS::Neutron::Net
properties:
- name: network
+ name: { get_param: agent_count }
subnet:
type: OS::Neutron::Subnet
@@ -91,7 +95,7 @@ resources:
type: OS::Nova::KeyPair
properties:
save_private_key: true
- name: agent_keypair
+ name: { get_param: key_name }
open_security_group:
type: OS::Neutron::SecurityGroup
diff --git a/snaps/openstack/tests/heat/agent.yaml b/snaps/openstack/tests/heat/agent.yaml
index 014b14f..8ac0660 100644
--- a/snaps/openstack/tests/heat/agent.yaml
+++ b/snaps/openstack/tests/heat/agent.yaml
@@ -25,7 +25,6 @@ parameters:
default: 'Ubuntu 16.04'
key_name:
type: string
- default: test_key
username:
type: string
default: test_user