diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2017-02-18 15:46:43 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2017-02-19 15:47:20 -0600 |
| commit | 73809a98ed63af214ced7d3f51814ca91b122bbe (patch) | |
| tree | a5ce0133bc8134a9bec885bc465e004010f699fb /openstackclient/network | |
| parent | b399b0406ce4c55345c8f11064a5e85ef73dd8fd (diff) | |
| download | python-openstackclient-73809a98ed63af214ced7d3f51814ca91b122bbe.tar.gz | |
Remove remaining uses of SDK Proxy.session
SDK commit Ie67c240e3caa5e100ce07db3862718195c894748 exposed lingering uses
of Proxy.session in OSC. Get rid of them.
Change-Id: Icab230f1897a446cf3deb0e3d0550d24e11a0ef3
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/client.py | 5 | ||||
| -rw-r--r-- | openstackclient/network/v2/floating_ip.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py index c562058d..9525b947 100644 --- a/openstackclient/network/client.py +++ b/openstackclient/network/client.py @@ -44,6 +44,11 @@ def make_client(instance): LOG.debug('Connection: %s', conn) LOG.debug('Network client initialized using OpenStack SDK: %s', conn.network) + + # NOTE(dtroyer): Horrible ugly hack since we don't actually save + # the connection anywhere yet, so stash it in the + # instance directly from here for other uses + instance.sdk_connection = conn return conn.network diff --git a/openstackclient/network/v2/floating_ip.py b/openstackclient/network/v2/floating_ip.py index 980c41c7..41b208aa 100644 --- a/openstackclient/network/v2/floating_ip.py +++ b/openstackclient/network/v2/floating_ip.py @@ -241,7 +241,7 @@ class DeleteFloatingIP(common.NetworkAndComputeDelete): def take_action_network(self, client, parsed_args): (obj, self.ip_cache) = _find_floating_ip( - client.session, + self.app.client_manager.sdk_connection.session, self.ip_cache, self.r, ignore_missing=False, @@ -472,7 +472,7 @@ class ShowFloatingIP(common.NetworkAndComputeShowOne): def take_action_network(self, client, parsed_args): (obj, self.ip_cache) = _find_floating_ip( - client.session, + self.app.client_manager.sdk_connection.session, [], parsed_args.floating_ip, ignore_missing=False, |
