openstackclient quota show command has problems with columns

Bug #1418392 reported by Marcos Lobo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Undecided
Marcos Lobo
python-cliff (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In python-openstackclient-0.4.1-1

The 'quota show' command has the output formatter:

-c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated

But it doesn't work. Tests:

(openstack) quota show PROJECT_ID -c ram
ERROR: cliff.app 'module' object has no attribute 'compress'

(openstack) quota show 1ba03dae-e7f9-4b1f-afb3-ba9429d45c67 -c cores
ERROR: cliff.app 'module' object has no attribute 'compress'

(openstack) quota show -c cores 1ba03dae-e7f9-4b1f-afb3-ba9429d45c67
ERROR: cliff.app 'module' object has no attribute 'compress'

For other commands, that output formatter works, for example:

(openstack) project list -c ID
+--------------------------------------+
| ID |
+--------------------------------------+
| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy |

description: updated
Changed in python-openstackclient:
assignee: nobody → Marcos Lobo (marcos-fermin-lobo)
Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

The problem is related with python 2.6 and the itertools module. Patch is coming...

affects: python-openstackclient → python-cliff
summary: - Quota show command has problems with colums
+ openstackclient quota show command has problems with columns
affects: python-cliff → python-openstackclient
Revision history for this message
Terry Howe (thowe-g) wrote :

I'd be curious to see "quota show PROJECT_ID -c ram --debug" to get a full stack trace.

Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

Ok, aparently this problem is solved in the last python-cliff version https://github.com/openstack/cliff/blob/master/cliff/show.py#L42

The problem was here https://github.com/openstack/cliff/commit/e3bec7be19c8cfa8e8025e84bf0444109dcce730#diff-149435a5aaeb5930192be401684e091fL41

For python 2.6, itertool wasn't have 'compress' function, so it was crashing.

Still, I thing this is a bug in python-openstackclient because it has not the proper version of python-cliff library. I propose to change the requirements for python-openstackclient-0.4.1 in order to have the good python-cliff version

Revision history for this message
Steve Martinelli (stevemar) wrote :

Is it possible to change the requirements of a package that's already out there? I mean we could backport a fix, but would things actually get repackaged?

Revision history for this message
Dean Troyer (dtroyer) wrote :

We don't do stable releases (yet?), we only roll forward. There may be de facto stable releases at some point for the actual client libs, of which OSC is not one, for stable branch testing that requires some fix.

Since the bug is in cliff, simply installing an updated cliff release should take care of it. In a fresh install, pip will install the latest release as we do not cap cliff in our requirements.

I can not speak to what can/will happen with packaged releases of OSC.

Changed in python-openstackclient:
status: New → Invalid
Revision history for this message
Michael Terry (mterry) wrote :

Switching task to python-cliff, since that's where the bug is. And marking fix released, since wily has a version with the fix.

affects: python-openstackclient (Ubuntu) → python-cliff (Ubuntu)
Changed in python-cliff (Ubuntu):
status: New → Fix Released
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.