summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-06-29 11:15:37 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-06-29 11:15:37 -0600
commita56224ad97ed18dfc23bec1bb16f78a5f4b5903c (patch)
treefcc5ea5f79620de47d8dbe2d63e7caf714979172
parent2a4dc5493763a241c9895652bf1c71ac3ef0e5b3 (diff)
Changed credentials for deploying heat templates.
The old credentials had been working on other pods but are not working with our latest deployed by Kolla. This change does not affect any of the functionality included in the tests. It simply takes the administrative user credentials and changes the project to the newly created one. Change-Id: I76c605797b68f902f2ee5c679bd5b8a50c48a501 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--snaps/openstack/tests/create_stack_tests.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/snaps/openstack/tests/create_stack_tests.py b/snaps/openstack/tests/create_stack_tests.py
index 626fc97..d56c967 100644
--- a/snaps/openstack/tests/create_stack_tests.py
+++ b/snaps/openstack/tests/create_stack_tests.py
@@ -133,11 +133,15 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
super(self.__class__, self).__start__()
self.guid = str(uuid.uuid4())
- self.heat_cli = heat_utils.heat_client(self.os_creds)
+
+ self.heat_creds = self.admin_os_creds
+ self.heat_creds.project_name = self.admin_os_creds.project_name
+
+ self.heat_cli = heat_utils.heat_client(self.heat_creds)
self.stack_creator = None
self.image_creator = OpenStackImage(
- self.os_creds, openstack_tests.cirros_image_settings(
+ self.heat_creds, openstack_tests.cirros_image_settings(
name=self.__class__.__name__ + '-' + str(self.guid) + '-image',
image_metadata=self.image_metadata))
self.image_creator.create()
@@ -191,7 +195,7 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
name=self.__class__.__name__ + '-' + str(self.guid) + '-stack',
template_path=self.heat_tmplt_path,
env_values=self.env_values)
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
created_stack = self.stack_creator.create()
self.assertIsNotNone(created_stack)
@@ -217,7 +221,7 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
name=self.__class__.__name__ + '-' + str(self.guid) + '-stack',
template=template_dict,
env_values=self.env_values)
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
created_stack = self.stack_creator.create()
self.assertIsNotNone(created_stack)
@@ -242,7 +246,7 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
name=self.__class__.__name__ + '-' + str(self.guid) + '-stack',
template=template_dict,
env_values=self.env_values)
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
created_stack = self.stack_creator.create()
self.assertIsNotNone(created_stack)
@@ -287,7 +291,7 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
name=self.__class__.__name__ + '-' + str(self.guid) + '-stack',
template=template_dict,
env_values=self.env_values)
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
created_stack1 = self.stack_creator.create()
@@ -300,7 +304,7 @@ class CreateStackSuccessTests(OSIntegrationTestCase):
self.assertEqual(0, len(self.stack_creator.get_outputs()))
# Should be retrieving the instance data
- stack_creator2 = create_stack.OpenStackHeatStack(self.os_creds,
+ stack_creator2 = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
stack2 = stack_creator2.create()
self.assertEqual(created_stack1.id, stack2.id)
@@ -314,6 +318,9 @@ class CreateStackNegativeTests(OSIntegrationTestCase):
def setUp(self):
super(self.__class__, self).__start__()
+ self.heat_creds = self.admin_os_creds
+ self.heat_creds.project_name = self.admin_os_creds.project_name
+
self.stack_name = self.__class__.__name__ + '-' + str(uuid.uuid4())
self.stack_creator = None
self.heat_tmplt_path = pkg_resources.resource_filename(
@@ -330,7 +337,7 @@ class CreateStackNegativeTests(OSIntegrationTestCase):
"""
stack_settings = StackSettings(name=self.stack_name,
template_path=self.heat_tmplt_path)
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
with self.assertRaises(HTTPBadRequest):
self.stack_creator.create()
@@ -341,7 +348,7 @@ class CreateStackNegativeTests(OSIntegrationTestCase):
"""
stack_settings = StackSettings(name=self.stack_name,
template_path='foo')
- self.stack_creator = create_stack.OpenStackHeatStack(self.os_creds,
+ self.stack_creator = create_stack.OpenStackHeatStack(self.heat_creds,
stack_settings)
with self.assertRaises(IOError):
self.stack_creator.create()