image list fails against Icehouse cloud with OSC 3.6.0

Bug #1655335 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

This used to work with older OSC versions, e.g. 3.2.0:

~$ osc-320/bin/openstack image list
+--------------------------------------+-----------------------------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+-----------------------------------------------------+--------+
| ef465ed9-3a3a-4276-a1e0-51c8ea7813fb | CentOS7 | active |
| eb482452-2878-4db0-a5f3-b4831d53b25a | Ubuntu 16.04.1 | active |
+--------------------------------------+-----------------------------------------------------+--------+

but with the newest release, I am seeing this error instead:

$ osc-360/bin/openstack image list
Resource doesn't have field name

The traceback looks like this:

Traceback (most recent call last):
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/openstackclient/image/v2/image.py", line 545, in take_action
    data = utils.sort_items(data, parsed_args.sort)
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/osc_lib/utils.py", line 405, in sort_items
    reverse=reverse)
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/osc_lib/utils.py", line 404, in <lambda>
    items.sort(key=lambda item: get_field(item, sort_key),
  File "/home/jrosenboom/osc-360/local/lib/python2.7/site-packages/osc_lib/utils.py", line 298, in get_field
    raise exceptions.CommandError(msg % field)

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

This is related to the latest openstacksdk, falling back to openstacksdk===0.9.10 fixes the issue for me.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Not sure if is it really a duplicate, but at least closely related to https://launchpad.net/bugs/1654806

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.