summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_instance.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-07-06 11:58:52 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-07-06 11:58:52 -0600
commit5616cafabcc5f8ab75ee6fcaefa87e3fbd126ce9 (patch)
treefeeb024010654ca1889ae8231176fce083e4a41b /snaps/openstack/create_instance.py
parent815a21216c6df1a33eff7a5521ee0b08f4696822 (diff)
Added support for using '~' for SSH key location.
While testing changes, fixed problems found with querying for floating IPs which also required adding network data to the VMInst domain object. JIRA: SNAPS-85 Change-Id: I0ecf3a6885ce84fe14c4a6db09269c56dc0ad9fc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r--snaps/openstack/create_instance.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index 68c421d..c8e668f 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -102,12 +102,13 @@ class OpenStackVmInstance:
logger.info(
'Found existing machine with name - %s',
self.instance_settings.name)
- fips = neutron_utils.get_floating_ips(self.__nova)
+ fips = neutron_utils.get_floating_ips(self.__neutron)
for fip in fips:
- if fip.instance_id == server.id:
- self.__floating_ips.append(fip)
- # TODO - Determine a means to associate to the FIP
- # configuration and add to FIP map
+ for subnet_name, ips in server.networks.items():
+ if fip.ip in ips:
+ self.__floating_ips.append(fip)
+ # TODO - Determine a means to associate to the FIP
+ # configuration and add to FIP map
def __create_vm(self, block=False):
"""