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