Merge "Switch list_floating_ip_pools to REST"

This commit is contained in:
Jenkins 2017-03-25 17:13:56 +00:00 committed by Gerrit Code Review
commit c45b3f8902
2 changed files with 7 additions and 7 deletions

View File

@ -449,11 +449,6 @@ class NeutronFloatingIPUpdate(task_manager.Task):
return client.neutron_client.update_floatingip(**self.args)
class FloatingIPPoolList(task_manager.Task):
def main(self, client):
return client.nova_client.floating_ip_pools.list()
class SubnetCreate(task_manager.Task):
def main(self, client):
return client.neutron_client.create_subnet(**self.args)

View File

@ -1952,6 +1952,11 @@ class OpenStackCloud(_normalize.Normalizer):
def list_floating_ip_pools(self):
"""List all available floating IP pools.
NOTE: This function supports the nova-net view of the world. nova-net
has been deprecated, so it's highly recommended to switch to using
neutron. `get_external_ipv4_floating_networks` is what you should
almost certainly be using.
:returns: A list of floating IP pool ``munch.Munch``.
"""
@ -1961,8 +1966,8 @@ class OpenStackCloud(_normalize.Normalizer):
with _utils.shade_exceptions("Error fetching floating IP pool list"):
return [
{'name': p['name']} for p in self.manager.submit_task(
_tasks.FloatingIPPoolList())]
{'name': p['name']}
for p in self._compute_client.get('os-floating-ip-pools')]
def _list_floating_ips(self, filters=None):
if self._use_neutron_floating():