Merge "Make _create_security_group() non-private"

changes/82/779382/1
Zuul 2 years ago committed by Gerrit Code Review
commit d9021ee302
  1. 10
      tempest/scenario/manager.py
  2. 2
      tempest/scenario/test_minimum_basic.py
  3. 2
      tempest/scenario/test_network_advanced_server_ops.py
  4. 2
      tempest/scenario/test_network_basic_ops.py
  5. 2
      tempest/scenario/test_network_v6.py
  6. 2
      tempest/scenario/test_server_basic_ops.py
  7. 2
      tempest/scenario/test_shelve_instance.py
  8. 2
      tempest/scenario/test_snapshot_pattern.py
  9. 2
      tempest/scenario/test_stamp_pattern.py
  10. 2
      tempest/scenario/test_volume_backup_restore.py
  11. 2
      tempest/scenario/test_volume_boot_pattern.py
  12. 4
      tempest/scenario/test_volume_migrate_attached.py

@ -590,7 +590,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
rules.append(sg_rule)
return rules
def _create_security_group(self, **kwargs):
def create_security_group(self, **kwargs):
"""Create security group and add rules to security group"""
if not kwargs.get('name'):
kwargs['name'] = data_utils.rand_name(self.__class__.__name__)
@ -1386,10 +1386,10 @@ class NetworkScenarioTest(ScenarioTest):
self.log_console_output()
self.fail(msg)
def _create_security_group(self, security_group_rules_client=None,
project_id=None,
namestart='secgroup-smoke',
security_groups_client=None):
def create_security_group(self, security_group_rules_client=None,
project_id=None,
namestart='secgroup-smoke',
security_groups_client=None):
if security_group_rules_client is None:
security_group_rules_client = self.security_group_rules_client
if security_groups_client is None:

@ -78,7 +78,7 @@ class TestMinimumBasicScenario(manager.ScenarioTest):
self.assertEqual(1, disks.count(CONF.compute.volume_device_name))
def create_and_add_security_group_to_server(self, server):
secgroup = self._create_security_group()
secgroup = self.create_security_group()
self.servers_client.add_security_group(server['id'],
name=secgroup['name'])
self.addCleanup(self.servers_client.remove_security_group,

@ -60,7 +60,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
def _setup_server(self, keypair):
security_groups = []
if utils.is_extension_enabled('security-group', 'network'):
security_group = self._create_security_group()
security_group = self.create_security_group()
security_groups = [{'name': security_group['name']}]
network, _, _ = self.create_networks()
server = self.create_server(

@ -159,7 +159,7 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
keypair = self.create_keypair()
self.keypairs[keypair['name']] = keypair
security_groups = [
{'name': self._create_security_group()['name']}
{'name': self.create_security_group()['name']}
]
network = {'uuid': network['id']}
if port_id is not None:

@ -66,7 +66,7 @@ class TestGettingAddress(manager.NetworkScenarioTest):
def setUp(self):
super(TestGettingAddress, self).setUp()
self.keypair = self.create_keypair()
self.sec_grp = self._create_security_group()
self.sec_grp = self.create_security_group()
def prepare_network(self, address6_mode, n_subnets6=1, dualnet=False):
"""Prepare network

@ -128,7 +128,7 @@ class TestServerBasicOps(manager.ScenarioTest):
@utils.services('compute', 'network')
def test_server_basic_ops(self):
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
self.md = {'meta1': 'data1', 'meta2': 'data2', 'metaN': 'dataN'}
self.instance = self.create_server(
key_name=keypair['name'],

@ -76,7 +76,7 @@ class TestShelveInstance(manager.ScenarioTest):
cold_migrate=False):
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
security_groups = [{'name': security_group['name']}]
server = self.create_server(

@ -50,7 +50,7 @@ class TestSnapshotPattern(manager.ScenarioTest):
def test_snapshot_pattern(self):
# prepare for booting an instance
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
# boot an instance and create a timestamp file in it
server = self.create_server(

@ -81,7 +81,7 @@ class TestStampPattern(manager.ScenarioTest):
def test_stamp_pattern(self):
# prepare for booting an instance
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
# boot an instance and create a timestamp file in it
volume = self.create_volume()

@ -70,7 +70,7 @@ class TestVolumeBackupRestore(manager.ScenarioTest):
# Create keypair and security group
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
# Boot a server from the restored backup
bd_map_v2 = [{

@ -64,7 +64,7 @@ class TestVolumeBootPattern(manager.EncryptionScenarioTest):
LOG.info("Creating keypair and security group")
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
# create an instance from volume
LOG.info("Booting instance 1 from volume")

@ -100,7 +100,7 @@ class TestVolumeMigrateRetypeAttached(manager.ScenarioTest):
def test_volume_retype_attached(self):
LOG.info("Creating keypair and security group")
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
# create volume types
LOG.info("Creating Volume types")
@ -156,7 +156,7 @@ class TestVolumeMigrateRetypeAttached(manager.ScenarioTest):
def test_volume_migrate_attached(self):
LOG.info("Creating keypair and security group")
keypair = self.create_keypair()
security_group = self._create_security_group()
security_group = self.create_security_group()
LOG.info("Creating volume")
# Create a unique volume type to avoid using the backend default

Loading…
Cancel
Save