summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/tests/neutron_utils_tests.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-08-17 15:21:37 -0600
committerSteven Pisarski <s.pisarski@cablelabs.com>2017-08-24 21:12:02 +0000
commit1342eb17df248ec75cc57e9c380a7753fc432194 (patch)
tree72a3b065394b7bcaaddb801e3321edc1ba4b8818 /snaps/openstack/utils/tests/neutron_utils_tests.py
parent49aaa5d61e87e11c5d5b9ce7dd2fa598f16b82a7 (diff)
Added method to return OpenStackVmInstance from Heat.
OpenStackHeatStack now can introspect the VMs that the template was responsible for deploying and return an instanitated instance of OpenStackVmInstance for each VM deployed. When the VM has a Floating IP, these instances have the ability to connect via SSH just like one created from scratch. JIRA: SNAPS-172 Change-Id: I5a7ed3a09bb871afc55c718aa80a9069b1eb4da7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/utils/tests/neutron_utils_tests.py')
-rw-r--r--snaps/openstack/utils/tests/neutron_utils_tests.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/snaps/openstack/utils/tests/neutron_utils_tests.py b/snaps/openstack/utils/tests/neutron_utils_tests.py
index 5493f5b..05d508d 100644
--- a/snaps/openstack/utils/tests/neutron_utils_tests.py
+++ b/snaps/openstack/utils/tests/neutron_utils_tests.py
@@ -502,8 +502,7 @@ class NeutronUtilsRouterTests(OSComponentTestCase):
def test_create_port_null_name(self):
"""
- Tests the neutron_utils.create_port() function for an Exception when
- the port name value is None
+ Tests the neutron_utils.create_port() when the port name value is None
"""
self.network = neutron_utils.create_network(
self.neutron, self.os_creds, self.net_config.network_settings)
@@ -519,14 +518,16 @@ class NeutronUtilsRouterTests(OSComponentTestCase):
self.assertTrue(validate_subnet(
self.neutron, subnet_setting.name, subnet_setting.cidr, True))
- with self.assertRaises(Exception):
- self.port = neutron_utils.create_port(
- self.neutron, self.os_creds,
- PortSettings(
- network_name=self.net_config.network_settings.name,
- ip_addrs=[{
- 'subnet_name': subnet_setting.name,
- 'ip': ip_1}]))
+ self.port = neutron_utils.create_port(
+ self.neutron, self.os_creds,
+ PortSettings(
+ network_name=self.net_config.network_settings.name,
+ ip_addrs=[{
+ 'subnet_name': subnet_setting.name,
+ 'ip': ip_1}]))
+
+ port = neutron_utils.get_port_by_id(self.neutron, self.port.id)
+ self.assertEqual(self.port, port)
def test_create_port_null_network_object(self):
"""