Просмотр исходного кода

Merge pull request #43 from MartinPaulo/issue_42

OpenStackFloatingIP in_use method doesn't return the correct result #42
Enis Afgan 9 лет назад
Родитель
Сommit
c33a8d5c58
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cloudbridge/cloud/providers/openstack/resources.py

+ 1 - 1
cloudbridge/cloud/providers/openstack/resources.py

@@ -788,7 +788,7 @@ class OpenStackFloatingIP(BaseFloatingIP):
         return self._ip.get('fixed_ip_address', None)
 
     def in_use(self):
-        return True if self._ip.get('status', None) == 'ACTIVE' else False
+        return bool(self._ip.get('port_id', None))
 
     def delete(self):
         self._provider.neutron.delete_floatingip(self.id)