summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_instance.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-07-17 10:14:23 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-07-17 10:14:23 -0600
commit34623d35ba81b5d8290b87e469af784be746f78f (patch)
tree562c49378fa3d192c40991ae1b4e48fc6e6a11f5 /snaps/openstack/create_instance.py
parent0f47ac44b59932544c45bd6df82a31aedb85b16f (diff)
Added proper assertion config NIC test.
The test that exercises the OpenStackVmInstance class config_nic() now checks the Ansible return code. JIRA: SNAPS-124 Change-Id: I7840cd53eea2eacf7952d14be30870c8fa3aeab8 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r--snaps/openstack/create_instance.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index 9aaf127..b034c5f 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -398,7 +398,7 @@ class OpenStackVmInstance:
"""
Responsible for configuring NICs on RPM systems where the instance has
more than one configured port
- :return: None
+ :return: the value returned by ansible_utils.apply_ansible_playbook()
"""
if len(self.__ports) > 1 and len(self.__floating_ips) > 0:
if self.vm_active(block=True) and self.vm_ssh_active(block=True):
@@ -406,11 +406,12 @@ class OpenStackVmInstance:
port_index = self.__ports.index((key, port))
if port_index > 0:
nic_name = 'eth' + repr(port_index)
- self.__config_nic(
+ retval = self.__config_nic(
nic_name, port,
self.__get_first_provisioning_floating_ip().ip)
logger.info('Configured NIC - %s on VM - %s',
nic_name, self.instance_settings.name)
+ return retval
def __get_first_provisioning_floating_ip(self):
"""