hosts.py missing from novaclient

Bug #1754450 reported by Tracy Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Won't Fix
Undecided
Unassigned

Bug Description

after installing the latest openstackclient i get the following

openstack host list
'Client' object has no attribute 'hosts'

looking further i see that hosts.py is missing from novaclient/v2

it installed python-novaclient==10.1.0

Revision history for this message
Tracy Jones (tjones-i) wrote :

just found it was deprecated.

Changed in python-novaclient:
status: New → Invalid
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

os-hosts has been deprecated, but it should still work for microversions <2.43

$ env | grep OS_COMPUTE
OS_COMPUTE_API_VERSION=2.42
$ openstack host list
'Client' object has no attribute 'hosts'

trace is:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/compute/v2/host.py", line 43, in take_action
    data = compute_client.hosts.list_all(parsed_args.zone)
AttributeError: 'Client' object has no attribute 'hosts'

openstackclient version 3.14.0
novaclient version 10.1.0

Changed in python-novaclient:
status: Invalid → New
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

os-hosts CLIs and python API bindings was removed in the following patch.

https://review.openstack.org/#/c/532989/

In the releasenote, it suggests alternatives.

    * ``nova host-describe`` - superseded by ``nova hypervisor-show``
    * ``nova host-list`` - superseded by ``nova hypervisor-list``
    * ``nova host-update`` - superseded by ``nova service-enable`` and
      ``nova service-disable``
    * ``nova host-action`` - no alternative by design

So the following commands can be used in the openstackclient instead of the removed commands.

- openstack hypervisor show
- openstack hypervisor list
- openstack compute service set

IMO, it should be fixed in the openstackclient side.
(Fix code and/or documents.)

Changed in python-novaclient:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.