Merge "Remove unused LOG var in test_stamp_pattern.py"
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index d85e4f7..7251e36 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -200,6 +200,10 @@
super(AttachVolumeShelveTestJSON, cls).skip_checks()
if not CONF.compute_feature_enabled.shelve:
raise cls.skipException('Shelve is not available.')
+ if CONF.compute.compute_volume_common_az:
+ # assuming cross_az_attach is set to false in nova.conf
+ # per the compute_volume_common_az option description
+ raise cls.skipException('Cross AZ attach not available.')
def _count_volumes(self, server, validation_resources):
# Count number of volumes on an instance
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 2a41d13..3eacece 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -540,14 +540,16 @@
rules.append(sg_rule)
return rules
- def _create_security_group(self):
+ def _create_security_group(self, **kwargs):
"""Create security group and add rules to security group"""
- sg_name = data_utils.rand_name(self.__class__.__name__)
- sg_desc = sg_name + " description"
+ if not kwargs.get('name'):
+ kwargs['name'] = data_utils.rand_name(self.__class__.__name__)
+ if not kwargs.get('description'):
+ kwargs['description'] = kwargs['name'] + " description"
secgroup = self.compute_security_groups_client.create_security_group(
- name=sg_name, description=sg_desc)['security_group']
- self.assertEqual(secgroup['name'], sg_name)
- self.assertEqual(secgroup['description'], sg_desc)
+ **kwargs)['security_group']
+ self.assertEqual(secgroup['name'], kwargs['name'])
+ self.assertEqual(secgroup['description'], kwargs['description'])
self.addCleanup(
test_utils.call_and_ignore_notfound_exc,
self.compute_security_groups_client.delete_security_group,