Merge "Fix scenarios not passing down specific network"

This commit is contained in:
Jenkins 2014-09-23 16:09:56 +00:00 committed by Gerrit Code Review
commit 64fc93510e
4 changed files with 6 additions and 26 deletions

View File

@ -213,26 +213,6 @@ class ScenarioTest(tempest.test.BaseTestCase):
if create_kwargs is None:
create_kwargs = {}
fixed_network_name = CONF.compute.fixed_network_name
if 'nics' not in create_kwargs and fixed_network_name:
_, networks = self.networks_client.list_networks()
# If several networks found, set the NetID on which to connect the
# server to avoid the following error "Multiple possible networks
# found, use a Network ID to be more specific."
# See Tempest #1250866
if len(networks) > 1:
for network in networks:
if network['label'] == fixed_network_name:
create_kwargs['nics'] = [{'net-id': network['id']}]
break
# If we didn't find the network we were looking for :
else:
msg = ("The network on which the NIC of the server must "
"be connected can not be found : "
"fixed_network_name=%s. Starting instance without "
"specifying a network.") % fixed_network_name
LOG.info(msg)
LOG.debug("Creating a server (name: %s, image: %s, flavor: %s)",
name, image, flavor)
_, server = self.servers_client.create_server(name, image, flavor,

View File

@ -61,8 +61,8 @@ class TestNetworkAdvancedServerOps(manager.NeutronScenarioTest):
network, subnet, router = self.create_networks()
public_network_id = CONF.network.public_network_id
create_kwargs = {
'nics': [
{'net-id': network.id},
'networks': [
{'uuid': network.id},
],
'key_name': self.keypair['name'],
'security_groups': [security_group],

View File

@ -147,8 +147,8 @@ class TestNetworkBasicOps(manager.NeutronScenarioTest):
self.keypairs[keypair['name']] = keypair
security_groups = [self.security_group]
create_kwargs = {
'nics': [
{'net-id': network.id},
'networks': [
{'uuid': network.id},
],
'key_name': keypair['name'],
'security_groups': security_groups,

View File

@ -234,8 +234,8 @@ class TestSecurityGroupsBasicOps(manager.NeutronScenarioTest):
if security_groups is None:
security_groups = [tenant.security_groups['default']]
create_kwargs = {
'nics': [
{'net-id': tenant.network.id},
'networks': [
{'uuid': tenant.network.id},
],
'key_name': tenant.keypair['name'],
'security_groups': security_groups,