diff options
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r-- | snaps/openstack/create_instance.py | 11 |
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): """ |