Merge "Make wait_until default as 'ACTIVE' in manager.create_server"
This commit is contained in:
commit
09df11b150
@ -117,7 +117,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||
return body['keypair']
|
||||
|
||||
def create_server(self, name=None, image_id=None, flavor=None,
|
||||
validatable=False, wait_until=None,
|
||||
validatable=False, wait_until='ACTIVE',
|
||||
clients=None, **kwargs):
|
||||
"""Wrapper utility that returns a test server.
|
||||
|
||||
|
@ -46,9 +46,7 @@ class TestEncryptedCinderVolumes(manager.EncryptionScenarioTest):
|
||||
image = self.glance_image_create()
|
||||
keypair = self.create_keypair()
|
||||
|
||||
return self.create_server(image_id=image,
|
||||
key_name=keypair['name'],
|
||||
wait_until='ACTIVE')
|
||||
return self.create_server(image_id=image, key_name=keypair['name'])
|
||||
|
||||
def create_encrypted_volume(self, encryption_provider, volume_type):
|
||||
volume_type = self.create_volume_type(name=volume_type)
|
||||
|
@ -104,9 +104,7 @@ class TestMinimumBasicScenario(manager.ScenarioTest):
|
||||
image = self.glance_image_create()
|
||||
keypair = self.create_keypair()
|
||||
|
||||
server = self.create_server(image_id=image,
|
||||
key_name=keypair['name'],
|
||||
wait_until='ACTIVE')
|
||||
server = self.create_server(image_id=image, key_name=keypair['name'])
|
||||
servers = self.servers_client.list_servers()['servers']
|
||||
self.assertIn(server['id'], [x['id'] for x in servers])
|
||||
|
||||
|
@ -65,8 +65,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
|
||||
server = self.create_server(
|
||||
networks=[{'uuid': network['id']}],
|
||||
key_name=keypair['name'],
|
||||
security_groups=security_groups,
|
||||
wait_until='ACTIVE')
|
||||
security_groups=security_groups)
|
||||
return server
|
||||
|
||||
def _setup_network(self, server, keypair):
|
||||
|
@ -160,8 +160,7 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
|
||||
server = self.create_server(
|
||||
networks=[network],
|
||||
key_name=keypair['name'],
|
||||
security_groups=security_groups,
|
||||
wait_until='ACTIVE')
|
||||
security_groups=security_groups)
|
||||
self.servers.append(server)
|
||||
return server
|
||||
|
||||
|
@ -126,8 +126,7 @@ class TestGettingAddress(manager.NetworkScenarioTest):
|
||||
srv = self.create_server(
|
||||
key_name=self.keypair['name'],
|
||||
security_groups=[{'name': self.sec_grp['name']}],
|
||||
networks=[{'uuid': n['id']} for n in networks],
|
||||
wait_until='ACTIVE')
|
||||
networks=[{'uuid': n['id']} for n in networks])
|
||||
fip = self.create_floating_ip(thing=srv)
|
||||
ips = self.define_server_ips(srv=srv)
|
||||
ssh = self.get_remote_client(
|
||||
|
@ -263,7 +263,6 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
networks=[{'uuid': tenant.network["id"]}],
|
||||
key_name=tenant.keypair['name'],
|
||||
security_groups=security_groups_names,
|
||||
wait_until='ACTIVE',
|
||||
clients=tenant.manager,
|
||||
**kwargs)
|
||||
if 'security_groups' in server:
|
||||
|
@ -54,7 +54,7 @@ class TestServerAdvancedOps(manager.ScenarioTest):
|
||||
@test.services('compute', 'volume')
|
||||
def test_resize_volume_backed_server_confirm(self):
|
||||
# We create an instance for use in this test
|
||||
instance = self.create_server(wait_until='ACTIVE', volume_backed=True)
|
||||
instance = self.create_server(volume_backed=True)
|
||||
instance_id = instance['id']
|
||||
resize_flavor = CONF.compute.flavor_ref_alt
|
||||
LOG.debug("Resizing instance %s from flavor %s to flavor %s",
|
||||
@ -75,7 +75,7 @@ class TestServerAdvancedOps(manager.ScenarioTest):
|
||||
@test.services('compute')
|
||||
def test_server_sequence_suspend_resume(self):
|
||||
# We create an instance for use in this test
|
||||
instance = self.create_server(wait_until='ACTIVE')
|
||||
instance = self.create_server()
|
||||
instance_id = instance['id']
|
||||
LOG.debug("Suspending instance %s. Current status: %s",
|
||||
instance_id, instance['status'])
|
||||
|
@ -138,8 +138,7 @@ class TestServerBasicOps(manager.ScenarioTest):
|
||||
key_name=keypair['name'],
|
||||
security_groups=[{'name': security_group['name']}],
|
||||
config_drive=CONF.compute_feature_enabled.config_drive,
|
||||
metadata=self.md,
|
||||
wait_until='ACTIVE')
|
||||
metadata=self.md)
|
||||
self.verify_ssh(keypair)
|
||||
self.verify_metadata()
|
||||
self.verify_metadata_on_config_drive()
|
||||
|
@ -75,8 +75,7 @@ class TestServerMultinode(manager.ScenarioTest):
|
||||
# by getting to active state here, this means this has
|
||||
# landed on the host in question.
|
||||
inst = self.create_server(
|
||||
availability_zone='%(zone)s:%(host_name)s' % host,
|
||||
wait_until='ACTIVE')
|
||||
availability_zone='%(zone)s:%(host_name)s' % host)
|
||||
server = self.servers_client.show_server(inst['id'])['server']
|
||||
servers.append(server)
|
||||
|
||||
|
@ -58,7 +58,6 @@ class TestShelveInstance(manager.ScenarioTest):
|
||||
image_id=CONF.compute.image_ref,
|
||||
key_name=keypair['name'],
|
||||
security_groups=security_groups,
|
||||
wait_until='ACTIVE',
|
||||
volume_backed=boot_from_volume)
|
||||
|
||||
instance_ip = self.get_server_ip(server)
|
||||
|
@ -49,8 +49,7 @@ class TestSnapshotPattern(manager.ScenarioTest):
|
||||
server = self.create_server(
|
||||
image_id=CONF.compute.image_ref,
|
||||
key_name=keypair['name'],
|
||||
security_groups=[{'name': security_group['name']}],
|
||||
wait_until='ACTIVE')
|
||||
security_groups=[{'name': security_group['name']}])
|
||||
|
||||
instance_ip = self.get_server_ip(server)
|
||||
timestamp = self.create_timestamp(instance_ip,
|
||||
@ -63,8 +62,7 @@ class TestSnapshotPattern(manager.ScenarioTest):
|
||||
server_from_snapshot = self.create_server(
|
||||
image_id=snapshot_image['id'],
|
||||
key_name=keypair['name'],
|
||||
security_groups=[{'name': security_group['name']}],
|
||||
wait_until='ACTIVE')
|
||||
security_groups=[{'name': security_group['name']}])
|
||||
|
||||
# check the existence of the timestamp file in the second instance
|
||||
server_from_snapshot_ip = self.get_server_ip(server_from_snapshot)
|
||||
|
@ -109,8 +109,7 @@ class TestStampPattern(manager.ScenarioTest):
|
||||
server = self.create_server(
|
||||
image_id=CONF.compute.image_ref,
|
||||
key_name=keypair['name'],
|
||||
security_groups=security_group,
|
||||
wait_until='ACTIVE')
|
||||
security_groups=security_group)
|
||||
|
||||
# create and add floating IP to server1
|
||||
ip_for_server = self.get_server_ip(server)
|
||||
|
@ -69,10 +69,7 @@ class TestVolumeBootPattern(manager.ScenarioTest):
|
||||
source_type,
|
||||
delete_on_termination=delete_on_termination))
|
||||
|
||||
return self.create_server(
|
||||
image_id='',
|
||||
wait_until='ACTIVE',
|
||||
**create_kwargs)
|
||||
return self.create_server(image_id='', **create_kwargs)
|
||||
|
||||
def _create_snapshot_from_volume(self, vol_id):
|
||||
snap_name = data_utils.rand_name(
|
||||
@ -229,8 +226,7 @@ class TestVolumeBootPattern(manager.ScenarioTest):
|
||||
self._delete_server(instance)
|
||||
|
||||
# boot instance from EBS image
|
||||
instance = self.create_server(
|
||||
image_id=image['id'])
|
||||
instance = self.create_server(image_id=image['id'])
|
||||
# just ensure that instance booted
|
||||
|
||||
# delete instance
|
||||
|
@ -62,7 +62,7 @@ class TestVolumeMigrateRetypeAttached(manager.ScenarioTest):
|
||||
block_device_mapping = [{'device_name': 'vda', 'volume_id': vol_id,
|
||||
'delete_on_termination': False}]
|
||||
|
||||
return self.create_server(image_id='', wait_until='ACTIVE',
|
||||
return self.create_server(image_id='',
|
||||
key_name=key_name,
|
||||
security_groups=security_groups,
|
||||
block_device_mapping=block_device_mapping)
|
||||
|
Loading…
Reference in New Issue
Block a user