summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/create_network_tests.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-04-17 08:24:18 -0600
committerspisarski <s.pisarski@cablelabs.com>2018-04-19 15:20:51 -0600
commitf65dbaef830fe7121173fdb83e5e4dde09b11a8a (patch)
treefa2c1a7bdc5fdc10b28c8ba722ff324267e9444a /snaps/openstack/tests/create_network_tests.py
parentbd658dbe250e93a9fa4405b99ecdb2ad1a7029b6 (diff)
Fixed bug with regards to subnet lookups.
Neutron returns all subnets regardless of visibility which cause problems within routers if there is another subnet with the same name attached to a different network. JIRA: SNAPS-304 In addition, this patch contains two other minor fixes. launch_utils.py - raise an exception when the creator is not properly instantiated network.py - allow fixed IPs to be none. Change-Id: Ib343074d925be4592a713727a03d5b531890eada Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/tests/create_network_tests.py')
-rw-r--r--snaps/openstack/tests/create_network_tests.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/snaps/openstack/tests/create_network_tests.py b/snaps/openstack/tests/create_network_tests.py
index d326889..5ba5cef 100644
--- a/snaps/openstack/tests/create_network_tests.py
+++ b/snaps/openstack/tests/create_network_tests.py
@@ -365,6 +365,7 @@ class CreateNetworkSuccessTests(OSIntegrationTestCase):
guid = self.__class__.__name__ + '-' + str(uuid.uuid4())
self.net_config = openstack_tests.get_pub_net_config(
+ project_name=self.os_creds.project_name,
net_name=guid + '-pub-net', subnet_name=guid + '-pub-subnet',
router_name=guid + '-pub-router', external_net=self.ext_net_name,
netconf_override=self.netconf_override)
@@ -395,7 +396,7 @@ class CreateNetworkSuccessTests(OSIntegrationTestCase):
# Create Network
self.net_creator = OpenStackNetwork(
self.os_creds, self.net_config.network_settings)
- self.net_creator.create()
+ network = self.net_creator.create()
# Validate network was created
self.assertTrue(neutron_utils_tests.validate_network(
@@ -405,7 +406,7 @@ class CreateNetworkSuccessTests(OSIntegrationTestCase):
# Validate subnets
self.assertTrue(neutron_utils_tests.validate_subnet(
- self.neutron,
+ self.neutron, network,
self.net_creator.network_settings.subnet_settings[0].name,
self.net_creator.network_settings.subnet_settings[0].cidr, True))
@@ -441,7 +442,7 @@ class CreateNetworkSuccessTests(OSIntegrationTestCase):
# Create Network
self.net_creator = OpenStackNetwork(
self.os_creds, self.net_config.network_settings)
- self.net_creator.create()
+ network = self.net_creator.create()
# Create Router
self.router_creator = create_router.OpenStackRouter(
@@ -456,7 +457,7 @@ class CreateNetworkSuccessTests(OSIntegrationTestCase):
# Validate subnets
self.assertTrue(neutron_utils_tests.validate_subnet(
- self.neutron,
+ self.neutron, network,
self.net_creator.network_settings.subnet_settings[0].name,
self.net_creator.network_settings.subnet_settings[0].cidr, True))
@@ -616,7 +617,7 @@ class CreateNetworkGatewayTests(OSIntegrationTestCase):
# Validate subnets
self.assertTrue(neutron_utils_tests.validate_subnet(
- self.neutron,
+ self.neutron, out_net,
self.net_creator.network_settings.subnet_settings[0].name,
self.net_creator.network_settings.subnet_settings[0].cidr, True))
@@ -645,7 +646,7 @@ class CreateNetworkGatewayTests(OSIntegrationTestCase):
# Validate subnets
self.assertTrue(neutron_utils_tests.validate_subnet(
- self.neutron,
+ self.neutron, out_net,
self.net_creator.network_settings.subnet_settings[0].name,
self.net_creator.network_settings.subnet_settings[0].cidr, True))
@@ -674,7 +675,7 @@ class CreateNetworkGatewayTests(OSIntegrationTestCase):
# Validate subnets
self.assertTrue(neutron_utils_tests.validate_subnet(
- self.neutron,
+ self.neutron, out_net,
self.net_creator.network_settings.subnet_settings[0].name,
self.net_creator.network_settings.subnet_settings[0].cidr, True))
@@ -812,6 +813,7 @@ class CreateNetworkTypeTests(OSComponentTestCase):
"""
guid = self.__class__.__name__ + '-' + str(uuid.uuid4())
self.net_config = openstack_tests.get_pub_net_config(
+ project_name=self.os_creds.project_name,
net_name=guid + '-pub-net', subnet_name=guid + '-pub-subnet')
self.neutron = neutron_utils.neutron_client(
@@ -959,6 +961,7 @@ class CreateMultipleNetworkTests(OSIntegrationTestCase):
guid = self.__class__.__name__ + '-' + str(uuid.uuid4())
self.net_config = openstack_tests.get_pub_net_config(
+ project_name=self.os_creds.project_name,
net_name=guid + '-pub-net', subnet_name=guid + '-pub-subnet')
self.neutron = neutron_utils.neutron_client(