]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat cleanups to align functional tests with pep8 1.3.4
authorSteven Hardy <shardy@redhat.com>
Wed, 19 Dec 2012 13:45:21 +0000 (13:45 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 20 Dec 2012 09:26:16 +0000 (09:26 +0000)
Lots of (mostly whitespace) cleanups to align all the functional test code
with pep8 v1.3.4

ref bug 1092057

Change-Id: Ifd6ef02bf3abd0b2f351f63423ab8aa7ff0cbd7c
Signed-off-by: Steven Hardy <shardy@redhat.com>
20 files changed:
heat/tests/functional/test_AutoScalingMultiAZSample.py
heat/tests/functional/test_CFN_API_Actions.py
heat/tests/functional/test_CFN_API_Actions_Boto.py
heat/tests/functional/test_CFN_API_UpdateStack.py
heat/tests/functional/test_HAProxy_Single_Instance.py
heat/tests/functional/test_OpenShift_Prebuilt_JEOS.py
heat/tests/functional/test_WordPress_2_Instances.py
heat/tests/functional/test_WordPress_2_Instances_With_EBS.py
heat/tests/functional/test_WordPress_2_Instances_With_EBS_EIP.py
heat/tests/functional/test_WordPress_Composed_Instances.py
heat/tests/functional/test_WordPress_Single_Instance.py
heat/tests/functional/test_WordPress_Single_Instance_Boto.py
heat/tests/functional/test_WordPress_Single_Instance_With_EBS.py
heat/tests/functional/test_WordPress_Single_Instance_With_EBS_EIP.py
heat/tests/functional/test_WordPress_Single_Instance_With_EIP.py
heat/tests/functional/test_WordPress_Single_Instance_With_HA.py
heat/tests/functional/test_WordPress_Single_Instance_With_IHA.py
heat/tests/functional/test_WordPress_With_LB.py
heat/tests/functional/test_WordPress_With_RDS.py
heat/tests/functional/util.py

index 151a1cf57dfd0e39bc40160b05a88b21614dc5e9..ff7de0377fadbbffb10312bf81af12face4050cd 100644 (file)
@@ -31,7 +31,7 @@ class AutoScalingMultiAZSampleFunctionalTest(unittest.TestCase):
                          'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WebServerGroup0 = util.Instance(self, 'WebServerGroup-0')
 
     def tearDown(self):
index fda59e0175f24c9652f3bdfa5be4d0e4ace54973..75ce1802cb38098db841f1ae33c61d79daae4636 100644 (file)
@@ -62,7 +62,7 @@ class CfnApiFunctionalTest(unittest.TestCase):
 
         inst = CfnApiFunctions()
         cls.stack = util.Stack(inst, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                               stack_paramstr)
         cls.WikiDatabase = util.Instance(inst, cls.logical_resource_name)
 
         try:
@@ -119,15 +119,15 @@ class CfnApiFunctionalTest(unittest.TestCase):
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "LastUpdatedTime")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         create_time = self.stack.response_xml_item(response, prefix,
                                                    "CreationTime")
-        self.assertTrue(self.time_re.match(create_time) != None)
+        self.assertTrue(self.time_re.match(create_time) is not None)
 
         description = self.stack.response_xml_item(response, prefix,
                                                    "TemplateDescription")
-        self.assertTrue(self.description_re.match(description) != None)
+        self.assertTrue(self.description_re.match(description) is not None)
 
         status_reason = self.stack.response_xml_item(response, prefix,
                                                      "StackStatusReason")
@@ -154,15 +154,15 @@ class CfnApiFunctionalTest(unittest.TestCase):
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "LastUpdatedTime")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         create_time = self.stack.response_xml_item(response, prefix,
                                                    "CreationTime")
-        self.assertTrue(self.time_re.match(create_time) != None)
+        self.assertTrue(self.time_re.match(create_time) is not None)
 
         description = self.stack.response_xml_item(response, prefix,
                                                    "Description")
-        self.assertTrue(self.description_re.match(description) != None)
+        self.assertTrue(self.description_re.match(description) is not None)
 
         status_reason = self.stack.response_xml_item(response, prefix,
                                                      "StackStatusReason")
@@ -181,18 +181,18 @@ class CfnApiFunctionalTest(unittest.TestCase):
         self.assertEqual(stack_timeout, self.stack_timeout)
 
         disable_rollback = self.stack.response_xml_item(response, prefix,
-                                                     "DisableRollback")
+                                                        "DisableRollback")
         self.assertEqual(disable_rollback, self.stack_disable_rollback)
 
         # Create a dict to lookup the expected template parameters
         template_parameters = {'DBUsername': 'dbuser',
-                                    'LinuxDistribution': 'F17',
-                                    'InstanceType': 'm1.xlarge',
-                                    'DBRootPassword': 'admin',
-                                    'KeyName': self.stack.keyname,
-                                    'DBPassword':
-                                        os.environ['OS_PASSWORD'],
-                                    'DBName': 'wordpress'}
+                               'LinuxDistribution': 'F17',
+                               'InstanceType': 'm1.xlarge',
+                               'DBRootPassword': 'admin',
+                               'KeyName': self.stack.keyname,
+                               'DBPassword':
+                               os.environ['OS_PASSWORD'],
+                               'DBName': 'wordpress'}
 
         # We do a fully qualified xpath lookup to extract the paramter
         # value for each key, then check the extracted value
@@ -201,8 +201,8 @@ class CfnApiFunctionalTest(unittest.TestCase):
             lookup = '[ParameterKey="' + key + '" and ParameterValue="' +\
                      value + '"]'
             lookup_value = self.stack.response_xml_item(response,
-                                                   param_prefix + lookup,
-                                                   "ParameterValue")
+                                                        param_prefix + lookup,
+                                                        "ParameterValue")
             self.assertEqual(lookup_value, value)
 
         # Then to a similar lookup to verify the Outputs section
@@ -212,8 +212,8 @@ class CfnApiFunctionalTest(unittest.TestCase):
         lookup = '[OutputKey="WebsiteURL" and OutputValue="' + expected_url +\
                  '" and Description="URL for Wordpress wiki"]'
         lookup_value = self.stack.response_xml_item(response,
-                                                   outputs_prefix + lookup,
-                                                   "OutputValue")
+                                                    outputs_prefix + lookup,
+                                                    "OutputValue")
         self.assertEqual(lookup_value, expected_url)
 
         print "DescribeStacks : OK"
@@ -223,30 +223,30 @@ class CfnApiFunctionalTest(unittest.TestCase):
         parameters['StackName'] = self.stack.stackname
         response = self.stack.heatclient.list_stack_events(**parameters)
         prefix = '/DescribeStackEventsResponse/DescribeStackEventsResult/' +\
-               'StackEvents/member[LogicalResourceId="' +\
-                self.logical_resource_name + '" and ResourceStatus="' +\
-                self.logical_resource_status + '"]'
+                 'StackEvents/member[LogicalResourceId="' +\
+                 self.logical_resource_name + '" and ResourceStatus="' +\
+                 self.logical_resource_status + '"]'
 
         stack_id = self.stack.response_xml_item(response, prefix, "StackId")
         self.stack.check_stackid(stack_id)
 
         event_id = self.stack.response_xml_item(response, prefix, "EventId")
-        self.assertTrue(re.match("[0-9]*$", event_id) != None)
+        self.assertTrue(re.match("[0-9]*$", event_id) is not None)
 
         resource_status = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceStatus")
+                                                       "ResourceStatus")
         self.assertEqual(resource_status, self.logical_resource_status)
 
         resource_type = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceType")
+                                                     "ResourceType")
         self.assertEqual(resource_type, self.logical_resource_type)
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "Timestamp")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         status_data = self.stack.response_xml_item(response, prefix,
-                                                      "ResourceStatusReason")
+                                                   "ResourceStatusReason")
         self.assertEqual(status_data, "state changed")
 
         stack_name = self.stack.response_xml_item(response, prefix,
@@ -258,14 +258,14 @@ class CfnApiFunctionalTest(unittest.TestCase):
         self.assertEqual(log_res_id, self.logical_resource_name)
 
         phys_res_id = self.stack.response_xml_item(response, prefix,
-                                                  "PhysicalResourceId")
-        self.assertTrue(self.phys_res_id_re.match(phys_res_id) != None)
+                                                   "PhysicalResourceId")
+        self.assertTrue(self.phys_res_id_re.match(phys_res_id) is not None)
 
         # ResourceProperties format is defined as a string "blob" by AWS
         # we return JSON encoded properies, so decode and check one key
         prop_json = self.stack.response_xml_item(response, prefix,
-                                                  "ResourceProperties")
-        self.assertTrue(prop_json != None)
+                                                 "ResourceProperties")
+        self.assertTrue(prop_json is not None)
 
         prop = json.loads(prop_json)
         self.assertEqual(prop["InstanceType"], "m1.xlarge")
@@ -282,40 +282,40 @@ class CfnApiFunctionalTest(unittest.TestCase):
         template = self.stack.response_xml_item(response, prefix,
                                                 "TemplateBody")
         json_load = template_format.parse(template)
-        self.assertTrue(json_load != None)
+        self.assertTrue(json_load is not None)
 
         # Then sanity check content - I guess we could diff
         # with the template file but for now just check the
         # description looks sane..
         description = json_load['Description']
-        self.assertTrue(self.description_re.match(description) != None)
+        self.assertTrue(self.description_re.match(description) is not None)
 
         print "GetTemplate : OK"
 
     def testDescribeStackResource(self):
         parameters = {'StackName': self.stack.stackname,
-            'LogicalResourceId': self.logical_resource_name}
+                      'LogicalResourceId': self.logical_resource_name}
         response = self.stack.heatclient.describe_stack_resource(**parameters)
         prefix = '/DescribeStackResourceResponse/DescribeStackResourceResult'\
-               + '/StackResourceDetail'
+                 + '/StackResourceDetail'
 
         stack_id = self.stack.response_xml_item(response, prefix, "StackId")
         self.stack.check_stackid(stack_id)
 
         resource_status = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceStatus")
+                                                       "ResourceStatus")
         self.assertEqual(resource_status, self.logical_resource_status)
 
         resource_type = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceType")
+                                                     "ResourceType")
         self.assertEqual(resource_type, self.logical_resource_type)
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "LastUpdatedTimestamp")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         status_reason = self.stack.response_xml_item(response, prefix,
-                                                      "ResourceStatusReason")
+                                                     "ResourceStatusReason")
         self.assertEqual(status_reason, "state changed")
 
         stack_name = self.stack.response_xml_item(response, prefix,
@@ -327,40 +327,40 @@ class CfnApiFunctionalTest(unittest.TestCase):
         self.assertEqual(log_res_id, self.logical_resource_name)
 
         phys_res_id = self.stack.response_xml_item(response, prefix,
-                                                  "PhysicalResourceId")
-        self.assertTrue(self.phys_res_id_re.match(phys_res_id) != None)
+                                                   "PhysicalResourceId")
+        self.assertTrue(self.phys_res_id_re.match(phys_res_id) is not None)
 
         metadata = self.stack.response_xml_item(response, prefix, "Metadata")
         json_load = json.loads(metadata)
-        self.assertTrue(json_load != None)
+        self.assertTrue(json_load is not None)
         self.assertTrue("AWS::CloudFormation::Init" in json_load)
 
         print "DescribeStackResource : OK"
 
     def testDescribeStackResources(self):
         parameters = {'NameOrPid': self.stack.stackname,
-            'LogicalResourceId': self.logical_resource_name}
+                      'LogicalResourceId': self.logical_resource_name}
         response = self.stack.heatclient.describe_stack_resources(**parameters)
         prefix = '/DescribeStackResourcesResponse/' +\
-                'DescribeStackResourcesResult/StackResources/member'
+                 'DescribeStackResourcesResult/StackResources/member'
 
         stack_id = self.stack.response_xml_item(response, prefix, "StackId")
         self.stack.check_stackid(stack_id)
 
         resource_status = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceStatus")
+                                                       "ResourceStatus")
         self.assertEqual(resource_status, self.logical_resource_status)
 
         resource_type = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceType")
+                                                     "ResourceType")
         self.assertEqual(resource_type, self.logical_resource_type)
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "Timestamp")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         status_reason = self.stack.response_xml_item(response, prefix,
-                                                      "ResourceStatusReason")
+                                                     "ResourceStatusReason")
         self.assertEqual(status_reason, "state changed")
 
         stack_name = self.stack.response_xml_item(response, prefix,
@@ -372,8 +372,8 @@ class CfnApiFunctionalTest(unittest.TestCase):
         self.assertEqual(log_res_id, self.logical_resource_name)
 
         phys_res_id = self.stack.response_xml_item(response, prefix,
-                                                  "PhysicalResourceId")
-        self.assertTrue(self.phys_res_id_re.match(phys_res_id) != None)
+                                                   "PhysicalResourceId")
+        self.assertTrue(self.phys_res_id_re.match(phys_res_id) is not None)
 
         print "DescribeStackResources : OK"
 
@@ -382,22 +382,22 @@ class CfnApiFunctionalTest(unittest.TestCase):
         parameters['StackName'] = self.stack.stackname
         response = self.stack.heatclient.list_stack_resources(**parameters)
         prefix = '/ListStackResourcesResponse/ListStackResourcesResult' +\
-               '/StackResourceSummaries/member'
+                 '/StackResourceSummaries/member'
 
         resource_status = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceStatus")
+                                                       "ResourceStatus")
         self.assertEqual(resource_status, self.logical_resource_status)
 
         status_reason = self.stack.response_xml_item(response, prefix,
-                                                      "ResourceStatusReason")
+                                                     "ResourceStatusReason")
         self.assertEqual(status_reason, "state changed")
 
         update_time = self.stack.response_xml_item(response, prefix,
                                                    "LastUpdatedTimestamp")
-        self.assertTrue(self.time_re.match(update_time) != None)
+        self.assertTrue(self.time_re.match(update_time) is not None)
 
         resource_type = self.stack.response_xml_item(response, prefix,
-                                                        "ResourceType")
+                                                     "ResourceType")
         self.assertEqual(resource_type, self.logical_resource_type)
 
         log_res_id = self.stack.response_xml_item(response, prefix,
@@ -405,8 +405,8 @@ class CfnApiFunctionalTest(unittest.TestCase):
         self.assertEqual(log_res_id, self.logical_resource_name)
 
         phys_res_id = self.stack.response_xml_item(response, prefix,
-                                                  "PhysicalResourceId")
-        self.assertTrue(self.phys_res_id_re.match(phys_res_id) != None)
+                                                   "PhysicalResourceId")
+        self.assertTrue(self.phys_res_id_re.match(phys_res_id) is not None)
 
         print "ListStackResources : OK"
 
@@ -424,6 +424,6 @@ class CfnApiFunctionalTest(unittest.TestCase):
         for param in templ_params:
             lookup = '[ParameterKey="' + param + '"]'
             val = self.stack.response_xml_item(response, prefix + lookup,
-                                                  'ParameterKey')
+                                               'ParameterKey')
             self.assertEqual(param, val)
         print "ValidateTemplate : OK"
index 4a966811e2d0b3ae3ab8a773daced58d575050c6..c51906f16a49c536ee18c1c5a0baf1074d278d21 100644 (file)
@@ -64,7 +64,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
 
         inst = CfnApiFunctions()
         cls.stack = util.StackBoto(inst, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                   stack_paramstr)
         cls.WikiDatabase = util.Instance(inst, cls.logical_resource_name)
 
         try:
@@ -118,7 +118,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
 
         # Extract the StackSummary for this stack
         summary = [s for s in response
-                    if s.stack_name == self.stack.stackname]
+                   if s.stack_name == self.stack.stackname]
         self.assertEqual(len(summary), 1)
 
         # Note the boto StackSummary object does not contain every item
@@ -129,7 +129,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.assertEqual(type(summary[0].creation_time), datetime.datetime)
 
         self.assertTrue(self.description_re.match(
-                                    summary[0].template_description) != None)
+            summary[0].template_description) is not None)
 
         self.assertEqual(summary[0].stack_name, self.stack.stackname)
 
@@ -144,7 +144,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
 
         # Extract the Stack object for this stack
         stacks = [s for s in response
-                    if s.stack_name == self.stack.stackname]
+                  if s.stack_name == self.stack.stackname]
         self.assertEqual(len(stacks), 1)
 
         self.assertEqual(type(stacks[0].creation_time), datetime.datetime)
@@ -152,7 +152,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.stack.check_stackid(stacks[0].stack_id)
 
         self.assertTrue(self.description_re.match(stacks[0].description)
-                        != None)
+                        is not None)
 
         self.assertEqual(stacks[0].stack_status_reason,
                          self.stack_status_reason)
@@ -168,13 +168,13 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
 
         # Create a dict to lookup the expected template parameters
         template_parameters = {'DBUsername': 'dbuser',
-                                    'LinuxDistribution': 'F17',
-                                    'InstanceType': 'm1.xlarge',
-                                    'DBRootPassword': 'admin',
-                                    'KeyName': self.stack.keyname,
-                                    'DBPassword':
-                                        os.environ['OS_PASSWORD'],
-                                    'DBName': 'wordpress'}
+                               'LinuxDistribution': 'F17',
+                               'InstanceType': 'm1.xlarge',
+                               'DBRootPassword': 'admin',
+                               'KeyName': self.stack.keyname,
+                               'DBPassword':
+                               os.environ['OS_PASSWORD'],
+                               'DBName': 'wordpress'}
 
         for key, value in template_parameters.iteritems():
             # The parameters returned via the API include a couple
@@ -199,14 +199,14 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         parameters['StackName'] = self.stack.stackname
         response = self.stack.heatclient.list_stack_events(**parameters)
         events = [e for e in response
-                       if e.logical_resource_id == self.logical_resource_name
-                       and e.resource_status == self.logical_resource_status]
+                  if e.logical_resource_id == self.logical_resource_name
+                  and e.resource_status == self.logical_resource_status]
 
         self.assertEqual(len(events), 1)
 
         self.stack.check_stackid(events[0].stack_id)
 
-        self.assertTrue(re.match("[0-9]*$", events[0].event_id) != None)
+        self.assertTrue(re.match("[0-9]*$", events[0].event_id) is not None)
 
         self.assertEqual(events[0].resource_status,
                          self.logical_resource_status)
@@ -223,7 +223,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
                          self.logical_resource_name)
 
         self.assertTrue(self.phys_res_id_re.match(
-                        events[0].physical_resource_id) != None)
+                        events[0].physical_resource_id) is not None)
 
         # Check ResourceProperties, skip pending resolution of #245
         properties = json.loads(events[0].resource_properties)
@@ -235,35 +235,35 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         parameters = {}
         parameters['StackName'] = self.stack.stackname
         response = self.stack.heatclient.get_template(**parameters)
-        self.assertTrue(response != None)
+        self.assertTrue(response is not None)
 
         result = response['GetTemplateResponse']['GetTemplateResult']
-        self.assertTrue(result != None)
+        self.assertTrue(result is not None)
         template = result['TemplateBody']
-        self.assertTrue(template != None)
+        self.assertTrue(template is not None)
 
         # Then sanity check content - I guess we could diff
         # with the template file but for now just check the
         # description looks sane..
         description = template['Description']
-        self.assertTrue(self.description_re.match(description) != None)
+        self.assertTrue(self.description_re.match(description) is not None)
 
         print "GetTemplate : OK"
 
     def testDescribeStackResource(self):
         parameters = {'StackName': self.stack.stackname,
-            'LogicalResourceId': self.logical_resource_name}
+                      'LogicalResourceId': self.logical_resource_name}
         response = self.stack.heatclient.describe_stack_resource(**parameters)
 
         # Note boto_client response for this is a dict, if upstream
         # pull request ever gets merged, this will change, see note/
         # link in boto_client.py
         desc_resp = response['DescribeStackResourceResponse']
-        self.assertTrue(desc_resp != None)
+        self.assertTrue(desc_resp is not None)
         desc_result = desc_resp['DescribeStackResourceResult']
-        self.assertTrue(desc_result != None)
+        self.assertTrue(desc_result is not None)
         res = desc_result['StackResourceDetail']
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)
 
         self.stack.check_stackid(res['StackId'])
 
@@ -274,7 +274,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         # Note due to issue mentioned above timestamp is a string in this case
         # not a datetime.datetime object
         self.assertTrue(self.time_re.match(res['LastUpdatedTimestamp'])
-                        != None)
+                        is not None)
 
         self.assertEqual(res['ResourceStatusReason'], 'state changed')
 
@@ -283,7 +283,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.assertEqual(res['LogicalResourceId'], self.logical_resource_name)
 
         self.assertTrue(self.phys_res_id_re.match(res['PhysicalResourceId'])
-                        != None)
+                        is not None)
 
         self.assertTrue("AWS::CloudFormation::Init" in res['Metadata'])
 
@@ -291,12 +291,12 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
 
     def testDescribeStackResources(self):
         parameters = {'NameOrPid': self.stack.stackname,
-            'LogicalResourceId': self.logical_resource_name}
+                      'LogicalResourceId': self.logical_resource_name}
         response = self.stack.heatclient.describe_stack_resources(**parameters)
         self.assertEqual(len(response), 1)
 
         res = response[0]
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)
 
         self.stack.check_stackid(res.stack_id)
 
@@ -313,7 +313,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.assertEqual(res.logical_resource_id, self.logical_resource_name)
 
         self.assertTrue(self.phys_res_id_re.match(res.physical_resource_id)
-                        != None)
+                        is not None)
 
         print "DescribeStackResources : OK"
 
@@ -324,7 +324,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.assertEqual(len(response), 1)
 
         res = response[0]
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)
 
         self.assertEqual(res.resource_status, self.logical_resource_status)
 
@@ -337,7 +337,7 @@ class CfnApiBotoFunctionalTest(unittest.TestCase):
         self.assertEqual(res.logical_resource_id, self.logical_resource_name)
 
         self.assertTrue(self.phys_res_id_re.match(res.physical_resource_id)
-                        != None)
+                        is not None)
 
         print "ListStackResources : OK"
 
index c1bfbf6f06a072677f8d5a4475f7a9ecadc24045..b207fda8b1c48121435e7b8511f09a6d6b3a6329 100644 (file)
@@ -38,8 +38,9 @@ class CfnApiUpdateStackFunctionalTest(unittest.TestCase):
         cls.instance_type = 'm1.xlarge'
         cls.db_user = 'dbuser'
         cls.stack_paramstr = ';'.join(['InstanceType=%s' % cls.instance_type,
-                         'DBUsername=%s' % cls.db_user,
-                         'DBPassword=' + os.environ['OS_PASSWORD']])
+                                       'DBUsername=%s' % cls.db_user,
+                                       'DBPassword=' +
+                                       os.environ['OS_PASSWORD']])
 
         cls.logical_resource_name = 'WikiDatabase'
         cls.logical_resource_type = 'AWS::EC2::Instance'
@@ -52,7 +53,7 @@ class CfnApiUpdateStackFunctionalTest(unittest.TestCase):
 
         cls.inst = CfnApiFunctions()
         cls.stack = util.Stack(cls.inst, template, 'F17', 'x86_64', 'cfntools',
-            cls.stack_paramstr)
+                               cls.stack_paramstr)
         cls.WikiDatabase = util.Instance(cls.inst, cls.logical_resource_name)
 
         try:
@@ -99,8 +100,9 @@ class CfnApiUpdateStackFunctionalTest(unittest.TestCase):
 
         self.db_user = 'anewuser'
         self.stack_paramstr = ';'.join(['InstanceType=%s' % self.instance_type,
-                         'DBUsername=%s' % self.db_user,
-                         'DBPassword=' + os.environ['OS_PASSWORD']])
+                                        'DBUsername=%s' % self.db_user,
+                                        'DBPassword=' +
+                                        os.environ['OS_PASSWORD']])
         self.stack.stack_paramstr = self.stack_paramstr
         self.stack.update()
         tries = 0
index 0d8fe3d930cd19f2099d262ee5e349f24f2f94e7..d1f49ef62d23962a3a776277e1fe3777e44ee603 100644 (file)
@@ -29,8 +29,8 @@ class HAProxyFunctionalTest(unittest.TestCase):
         wp_template = 'WordPress_Single_Instance.template'
 
         wp_paramstr = ';'.join(['InstanceType=m1.xlarge',
-                         'DBUsername=dbuser',
-                         'DBPassword=' + os.environ['OS_PASSWORD']])
+                                'DBUsername=dbuser',
+                                'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, wp_template, 'F17', 'x86_64', 'cfntools',
                                 wp_paramstr)
index 365ac40a84c477b7e37fa6ecfbbd52f969b7b1aa..598ac88c20c2cea8417aea8f84350c2714c12cd0 100644 (file)
@@ -31,7 +31,7 @@ class OpenShiftFunctionalTest(unittest.TestCase):
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge'])
 
         self.stack = util.Stack(self, template, 'F16', 'x86_64',
-                'cfntools-openshift', stack_paramstr)
+                                'cfntools-openshift', stack_paramstr)
 
         self.Node = util.Instance(self, 'OpenShiftNodeServer')
         self.Broker = util.Instance(self, 'OpenShiftBrokerServer')
index e9e9d81fa7ec510c00a986c466280eedc6ceeb05..802d36a0492ae114832d9bdd2a7a42003eb7b051 100644 (file)
@@ -28,11 +28,11 @@ class WordPress2Instances(unittest.TestCase):
         template = 'WordPress_2_Instances.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.DatabaseServer = util.Instance(self, 'DatabaseServer')
         self.WebServer = util.Instance(self, 'WebServer')
 
index 03e88a7176487441a6f940486295a7ea309e4073..8f2c721523fd3d51277eff1912253a8edf210c51 100644 (file)
@@ -28,11 +28,11 @@ class WordPress2InstancesWithEBS(unittest.TestCase):
         template = 'WordPress_2_Instances_With_EBS.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
 
         self.WikiDatabase = util.Instance(self, 'WikiDatabase')
         self.WebServer = util.Instance(self, 'WebServer')
@@ -65,7 +65,7 @@ class WordPress2InstancesWithEBS(unittest.TestCase):
 
         # Check EBS volume is present and mounted
         stdin, stdout, sterr = self.WikiDatabase.exec_command(
-                                'grep vdc /proc/mounts')
+            'grep vdc /proc/mounts')
         result = stdout.readlines().pop().rstrip()
         self.assertTrue(len(result))
         print "Checking EBS volume is attached : %s" % result
index 45a6f04a11b78977e379f0d2e79019f1ec7cfca1..fd111a3dbf0b9d7902bfd60c39f948fbbd980300 100644 (file)
@@ -26,8 +26,8 @@ class WordPress2EBSEIPFunctionalTest(unittest.TestCase):
         self.template = 'WordPress_2_Instances_With_EBS_EIP.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, self.template,
                                 'F17', 'x86_64', 'cfntools',
@@ -56,7 +56,7 @@ class WordPress2EBSEIPFunctionalTest(unittest.TestCase):
         # Check wordpress installation
         wp_config_file = '/etc/wordpress/wp-config.php'
         self.assertTrue(self.webserver.file_present(wp_config_file),
-            'wp-config.php is not present')
+                        'wp-config.php is not present')
 
         # Check mysql is installed and running
         stdin, stdout, sterr = self.database.exec_command(
@@ -76,14 +76,17 @@ class WordPress2EBSEIPFunctionalTest(unittest.TestCase):
         self.assertTrue('/var/lib/mysql' in result)
 
         # Check the floating IPs
-        self.assertTrue(self.webserver.floating_ip_present(),
+        self.assertTrue(
+            self.webserver.floating_ip_present(),
             'WebServer instance does not have a floating IP assigned')
-        self.assertTrue(self.database.floating_ip_present(),
+        self.assertTrue(
+            self.database.floating_ip_present(),
             'WikiDatabase instance does not have a floating IP assigned')
 
         # Check wordpress is running and acessible at the correct URL
         stack_url = self.stack.get_stack_output("WebsiteURL")
         print "Got stack output WebsiteURL=%s, verifying" % stack_url
         ver = verify.VerifyStack()
-        self.assertTrue(ver.verify_wordpress(stack_url),
+        self.assertTrue(
+            ver.verify_wordpress(stack_url),
             'Wordpress is not accessible at: %s' % stack_url)
index 3b788ac215722977b20593f6f2290d0f42420f42..455246f0bca5cd77fbd7fb7d26ed3dc23edfd7db 100644 (file)
@@ -27,16 +27,17 @@ class WordPressComposedInstancesFunctionalTest(unittest.TestCase):
         template = 'WordPress_Composed_Instances.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
 
         self.WebServer = util.Instance(self, 'WebServer')
 
-        self.MySqlDatabaseServer = util.Instance(self,
-                'DatabaseTemplate.MySqlDatabaseServer')
+        self.MySqlDatabaseServer = util.Instance(
+            self,
+            'DatabaseTemplate.MySqlDatabaseServer')
 
     def tearDown(self):
         self.stack.cleanup()
index d8d003f49cb0c68049c56c86ef74be07b4794da9..2dd37b7bf86826638029099e7af8f8b2c8158234 100644 (file)
@@ -30,7 +30,7 @@ class WordPressFunctionalTest(unittest.TestCase):
                          'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WikiDatabase = util.Instance(self, 'WikiDatabase')
 
     def tearDown(self):
index cac33c076f05f15fe81ba53f5c8d731203d2a44c..52a770f6b5fd59a75c3f6ee77863f042913f330c 100644 (file)
@@ -27,8 +27,8 @@ class WordPressBotoFunctionalTest(unittest.TestCase):
         template = 'WordPress_Single_Instance.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.StackBoto(self, template,
                                     'F17', 'x86_64', 'cfntools',
index dd1cbf4e20696fb61a1dc2a0ae338a9574f69038..325d850840a6a06abf8be08f27c2f5a5b0292f4a 100644 (file)
@@ -28,11 +28,11 @@ class WordPressSingleEBSFunctionalTest(unittest.TestCase):
         template = 'WordPress_Single_Instance_With_EBS.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WikiDatabase = util.Instance(self, 'WikiDatabase')
 
     def tearDown(self):
@@ -58,7 +58,7 @@ class WordPressSingleEBSFunctionalTest(unittest.TestCase):
 
         # Check EBS volume is present and mounted
         stdin, stdout, sterr = self.WikiDatabase.exec_command(
-                                'grep vdc /proc/mounts')
+            'grep vdc /proc/mounts')
         result = stdout.readlines().pop().rstrip()
         self.assertTrue(len(result))
         print "Checking EBS volume is attached : %s" % result
index 9964927ffc608298e839489ef1346f4a89689086..a155e4ef29776df0991c77d47535fedc5deb2203 100644 (file)
@@ -28,11 +28,11 @@ class WordPressEBSEIPFunctionalTest(unittest.TestCase):
         template = 'WordPress_Single_Instance_With_EBS_EIP.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WikiServer = util.Instance(self, 'WikiServer')
 
     def tearDown(self):
@@ -81,7 +81,7 @@ class WordPressEBSEIPFunctionalTest(unittest.TestCase):
 
         # Check EBS volume is present and mounted
         stdin, stdout, sterr = self.WikiServer.exec_command(
-                                'grep vdc /proc/mounts')
+            'grep vdc /proc/mounts')
         result = stdout.readlines().pop().rstrip()
         self.assertTrue(len(result))
         print "Checking EBS volume is attached : %s" % result
index 3902a78e65e0b28b82af5e0552ebc9907e6adca9..8194fe4d4078b790b6f236d14820bff537a90a92 100644 (file)
@@ -28,11 +28,11 @@ class WordPressEIPFunctionalTest(unittest.TestCase):
         template = 'WordPress_Single_Instance_With_EIP.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WebServer = util.Instance(self, 'WebServer')
 
     def tearDown(self):
index 81087dc4b0b6d68fae3e3f45ba793568dbf63d49..e6a861b1e6c26ee7df91c27ea424a316d6c5c01e 100644 (file)
@@ -27,11 +27,11 @@ class HaFunctionalTest(unittest.TestCase):
         template = 'WordPress_Single_Instance_With_HA.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WikiDatabase = util.Instance(self, 'WikiDatabase')
 
     def tearDown(self):
index 61c5a796d376e84f955e8acd3f121f4baeb754ad..8a100cfd8b442456703bf42d2b8913913ee8a781 100644 (file)
@@ -27,11 +27,11 @@ class WordPressIHAFunctionalTest(unittest.TestCase):
     def setUp(self):
         template = 'WordPress_Single_Instance_With_IHA.template'
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WikiDatabase = util.Instance(self, 'WikiDatabase')
 
     def tearDown(self):
index dd41969baa2c866d0e76ea00f192b3f851f1c1f7..f7a29edec538dad5bc002d55c0a0900f107b364d 100644 (file)
@@ -26,16 +26,17 @@ class WordPressWithLBFunctionalTest(unittest.TestCase):
         template = 'WordPress_With_LB.template'
 
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
 
         self.WikiServerOne = util.Instance(self, 'WikiServerOne')
         self.LBInstance = util.Instance(self, 'LoadBalancer.LB_instance')
-        self.MySqlDatabaseServer = util.Instance(self,
-                'DatabaseServer.MySqlDatabaseServer')
+        self.MySqlDatabaseServer = util.Instance(
+            self,
+            'DatabaseServer.MySqlDatabaseServer')
 
     def tearDown(self):
         self.stack.cleanup()
index a7d90295d776cba8d1451c08a91cef58b7b6040f..384a88e68a4bdc6d50346cdeeb68c6b0fe996c04 100644 (file)
@@ -26,11 +26,11 @@ class WordPressRDSFunctionalTest(unittest.TestCase):
     def setUp(self):
         template = 'WordPress_With_RDS.template'
         stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
-            'DBUsername=dbuser',
-            'DBPassword=' + os.environ['OS_PASSWORD']])
+                                   'DBUsername=dbuser',
+                                   'DBPassword=' + os.environ['OS_PASSWORD']])
 
         self.stack = util.Stack(self, template, 'F17', 'x86_64', 'cfntools',
-            stack_paramstr)
+                                stack_paramstr)
         self.WebServer = util.Instance(self, 'WebServer')
 
     def tearDown(self):
index 16c9a20bc6515797f4de0ed4e210c838ebce686f..c237bbe6ce853bed57dfe454cfe780c92129fd30 100644 (file)
@@ -65,15 +65,17 @@ class Instance(object):
                                   'keystone authentication required')
 
         self.creds = dict(username=os.environ['OS_USERNAME'],
-                password=os.environ['OS_PASSWORD'],
-                tenant=os.environ['OS_TENANT_NAME'],
-                auth_url=os.environ['OS_AUTH_URL'],
-                strategy=os.environ['OS_AUTH_STRATEGY'])
+                          password=os.environ['OS_PASSWORD'],
+                          tenant=os.environ['OS_TENANT_NAME'],
+                          auth_url=os.environ['OS_AUTH_URL'],
+                          strategy=os.environ['OS_AUTH_STRATEGY'])
         dbusername = 'testuser'
 
         self.novaclient = nova_client.Client(self.creds['username'],
-            self.creds['password'], self.creds['tenant'],
-            self.creds['auth_url'], service_type='compute')
+                                             self.creds['password'],
+                                             self.creds['tenant'],
+                                             self.creds['auth_url'],
+                                             service_type='compute')
 
         self.ssh = paramiko.SSHClient()
 
@@ -94,7 +96,7 @@ class Instance(object):
                 self.testcase.assertTrue(tries < 150, 'Timed out')
                 time.sleep(10)
             print 'Instance (%s) ip (%s) status (%s)' % (self.name, self.ip,
-                 server.status)
+                                                         server.status)
 
         tries = 0
         while True:
@@ -108,7 +110,7 @@ class Instance(object):
                 time.sleep(10)
             else:
                 print 'Instance (%s) ip (%s) SSH detected.' % (self.name,
-                        self.ip)
+                                                               self.ip)
                 break
 
         tries = 0
@@ -116,8 +118,11 @@ class Instance(object):
             try:
                 tries += 1
                 self.testcase.assertTrue(tries < 50, 'Timed out')
-                self.ssh.connect(self.ip, username='ec2-user',
-                    allow_agent=True, look_for_keys=True, password='password')
+                self.ssh.connect(self.ip,
+                                 username='ec2-user',
+                                 allow_agent=True,
+                                 look_for_keys=True,
+                                 password='password')
             except paramiko.AuthenticationException:
                 print 'Authentication error'
                 time.sleep(2)
@@ -194,7 +199,7 @@ class Instance(object):
         files = stdout.readlines()
 
         cfn_tools_files = ['cfn-init', 'cfn-hup', 'cfn-signal',
-                'cfn-get-metadata', 'cfn_helper.py']
+                           'cfn-get-metadata', 'cfn_helper.py']
 
         cfntools = {}
         for file in cfn_tools_files:
@@ -266,7 +271,7 @@ class Instance(object):
         t_data_list = joined_t_data.split('\n')
         # must match user data injection
         t_data_list.insert(len(t_data_list) - 1,
-                u'touch /var/lib/cloud/instance/provision-finished')
+                           u'touch /var/lib/cloud/instance/provision-finished')
 
         self.testcase.assertEqual(t_data_list, remote_file_list_u)
 
@@ -294,12 +299,12 @@ class Instance(object):
                     self.testcase.assertEqual(data, f.read())
 
     def get_ssh_client(self):
-        if self.ssh.get_transport() != None:
+        if self.ssh.get_transport() is not None:
             return self.ssh
         return None
 
     def get_sftp_client(self):
-        if self.sftp != None:
+        if self.sftp is not None:
             return self.sftp
         return None
 
@@ -310,7 +315,7 @@ class Instance(object):
 class Stack(object):
 
     def __init__(self, testcase, template_file, distribution, arch, jeos_type,
-            stack_paramstr, stackname=DEFAULT_STACKNAME):
+                 stack_paramstr, stackname=DEFAULT_STACKNAME):
 
         self.testcase = testcase
         self.stackname = stackname
@@ -332,14 +337,19 @@ class Stack(object):
                                   'keystone',
                                   'keystone authentication required')
 
-        self.glanceclient = glance_client.Client(host="0.0.0.0", port=9292,
-            use_ssl=False, auth_tok=None, creds=self.creds)
+        self.glanceclient = glance_client.Client(host="0.0.0.0",
+                                                 port=9292,
+                                                 use_ssl=False,
+                                                 auth_tok=None,
+                                                 creds=self.creds)
 
         self.prepare_jeos(distribution, arch, jeos_type)
 
         self.novaclient = nova_client.Client(self.creds['username'],
-            self.creds['password'], self.creds['tenant'],
-            self.creds['auth_url'], service_type='compute')
+                                             self.creds['password'],
+                                             self.creds['tenant'],
+                                             self.creds['auth_url'],
+                                             service_type='compute')
 
         self.heatclient = self._create_heat_client()
 
@@ -404,7 +414,7 @@ class Stack(object):
         self.testcase.assertTrue(create_list)
         self.testcase.assertEqual(len(create_list), 1)
         stack_id = create_list[0].findtext('StackId')
-        self.testcase.assertTrue(stack_id != None)
+        self.testcase.assertTrue(stack_id is not None)
         self.check_stackid(stack_id)
 
     def _check_update_result(self, result):
@@ -414,18 +424,21 @@ class Stack(object):
         self.testcase.assertTrue(update_list)
         self.testcase.assertEqual(len(update_list), 1)
         stack_id = update_list[0].findtext('StackId')
-        self.testcase.assertTrue(stack_id != None)
+        self.testcase.assertTrue(stack_id is not None)
         self.check_stackid(stack_id)
 
     def check_stackid(self, stack_id):
         print "Checking %s matches expected format" % (stack_id)
-        self.testcase.assertTrue(self.stack_id_re.match(stack_id) != None)
+        self.testcase.assertTrue(self.stack_id_re.match(stack_id) is not None)
 
     def _create_heat_client(self):
         return heat_client.get_client('0.0.0.0', 8000,
-            self.creds['username'], self.creds['password'],
-            self.creds['tenant'], self.creds['auth_url'],
-            self.creds['strategy'], None, None, False)
+                                      self.creds['username'],
+                                      self.creds['password'],
+                                      self.creds['tenant'],
+                                      self.creds['auth_url'],
+                                      self.creds['strategy'],
+                                      None, None, False)
 
     def get_state(self):
         stack_list = self.heatclient.list_stacks(StackName=self.stackname)
@@ -552,9 +565,9 @@ class StackBoto(Stack):
         # and extract the ec2-credentials, so we can pass them into the
         # boto client
         keystone = client.Client(username=self.creds['username'],
-                             password=self.creds['password'],
-                             tenant_name=self.creds['tenant'],
-                             auth_url=self.creds['auth_url'])
+                                 password=self.creds['password'],
+                                 tenant_name=self.creds['tenant'],
+                                 auth_url=self.creds['auth_url'])
         ksusers = keystone.users.list()
         ksuid = [u.id for u in ksusers if u.name == self.creds['username']]
         self.testcase.assertEqual(len(ksuid), 1)
@@ -569,11 +582,14 @@ class StackBoto(Stack):
         # compatibility with the non-boto client wrapper, and are
         # actually ignored, only the port and credentials are used
         return heat_client_boto.get_client('0.0.0.0', 8000,
-            self.creds['username'], self.creds['password'],
-            self.creds['tenant'], self.creds['auth_url'],
-            self.creds['strategy'], None, None, False,
-            aws_access_key=ec2creds[0].access,
-            aws_secret_key=ec2creds[0].secret)
+                                           self.creds['username'],
+                                           self.creds['password'],
+                                           self.creds['tenant'],
+                                           self.creds['auth_url'],
+                                           self.creds['strategy'],
+                                           None, None, False,
+                                           aws_access_key=ec2creds[0].access,
+                                           aws_secret_key=ec2creds[0].secret)
 
     def get_state(self):
         stack_list = self.heatclient.list_stacks()