From ac81035e5010dadc99c36b09c632ed6004776c73 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Tue, 12 Nov 2019 17:26:06 +0100 Subject: [PATCH] Update Neutron client Change-Id: I0fc20a86a5abbaf8a5bbc26a4689edc442ee9def --- tobiko/openstack/neutron/__init__.py | 1 + tobiko/openstack/neutron/_client.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/tobiko/openstack/neutron/__init__.py b/tobiko/openstack/neutron/__init__.py index d890079e4..2d6d12528 100644 --- a/tobiko/openstack/neutron/__init__.py +++ b/tobiko/openstack/neutron/__init__.py @@ -31,6 +31,7 @@ list_ports = _client.list_ports list_subnets = _client.list_subnets list_subnet_cidrs = _client.list_subnet_cidrs list_agents = _client.list_agents +get_floating_ip = _client.get_floating_ip get_network = _client.get_network get_router = _client.get_router get_port = _client.get_port diff --git a/tobiko/openstack/neutron/_client.py b/tobiko/openstack/neutron/_client.py index ebff46e73..693fb36e0 100644 --- a/tobiko/openstack/neutron/_client.py +++ b/tobiko/openstack/neutron/_client.py @@ -130,6 +130,11 @@ def list_subnet_cidrs(client=None, **params): for subnet in list_subnets(client=client, **params)) +def get_floating_ip(floating_ip, client=None, **params): + floating_ip = neutron_client(client).show_floatingip(floating_ip, **params) + return floating_ip['floatingip'] + + def get_network(network, client=None, **params): return neutron_client(client).show_network(network, **params)['network']