diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2018-03-05 14:18:41 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2018-03-13 09:10:45 -0500 |
| commit | 53e7aab7ed4d6c981ca067c1db8bce290a5f0055 (patch) | |
| tree | 24f5bac6fd11336367170de84bbfcaff8b9ce8bf /openstackclient/network/common.py | |
| parent | b10941ddf6f7f6894b7d87f25c173f227b111e4e (diff) | |
| download | python-openstackclient-53e7aab7ed4d6c981ca067c1db8bce290a5f0055.tar.gz | |
Re-implement novaclient bits removed in 10.0
a)
/os-floating-ips was removed in Compute API 2.36 and from novaclient's
Python API in 10.0
Add to api.computev2:
floating_ip_add()
floating_ip_remove()
Convert add floating IP command to nova-net/neutron split:
"server add floating ip"
"server remove floating ip"
b)
/os-hosts was removed in Compute API 2.43 and from novaclient's
Python API in 10.0.
Add to api.computev2:
host_list()
host_set()
host_show()
Convert host commands to use intenal api:
"host list"
"host set"
"host show"
c)
The introduction of the Network-style commands into the server group
broke cliff's autoprogram directive as it executes the get_parser() methods
without fully initializing the Command object.
NOTE: This is really three reviews squashed to get through the gate in one pass.
Depends-on: Id6de87211d6c4ea8fd14aa9203d8d5b17e9e2f04
Change-Id: I5116086f9a9e4b2b31a744bf8f4558c79f0bfe59
Diffstat (limited to 'openstackclient/network/common.py')
| -rw-r--r-- | openstackclient/network/common.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/network/common.py b/openstackclient/network/common.py index eca0de3c..37bf1406 100644 --- a/openstackclient/network/common.py +++ b/openstackclient/network/common.py @@ -48,7 +48,10 @@ class NetworkAndComputeCommand(command.Command): parser = super(NetworkAndComputeCommand, self).get_parser(prog_name) parser = self.update_parser_common(parser) LOG.debug('common parser: %s', parser) - if self.app.client_manager.is_network_endpoint_enabled(): + if ( + self.app is None or + self.app.client_manager.is_network_endpoint_enabled() + ): return self.update_parser_network(parser) else: return self.update_parser_compute(parser) |
