liberty: two json/yaml formatters for list/show command if cliff 1.15.0 (and cliff-tablib) is installed

Bug #1531574 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
Invalid
Undecided
Unassigned
python-neutronclient
Won't Fix
Undecided
Unassigned
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

In Liberty, we have two json/yaml formatters in the help message if cliff 1.15.0 is used.
Unfortunately, JSON formatters for show command are different between cliff-tablib and cliff (1.15.0) but there is no way to distinguish two. It is confusing.

IMHO, it is better to use either of them.

This does not happen in Mitaka release, but it potentially happens if cliff-tablib is installed outside of openstack requirements.

[list command]
http://paste.openstack.org/show/483162/

usage: openstack server list [-h]
                             [-f {csv,html,json,json,table,value,yaml,yaml}]

[...]

  -f {csv,html,json,json,table,value,yaml,yaml}, --format {csv,html,json,json,table,value,yaml,yaml}
                        the output format, defaults to table

[...]

[show command]
http://paste.openstack.org/show/483163/

usage: openstack server show [-h]
                             [-f {html,json,json,shell,table,value,yaml,yaml}]
                             [-c COLUMN] [--max-width <integer>] [--noindent]
                             [--prefix PREFIX] [--diagnostics]
                             <server>

[...]

  -f {html,json,json,shell,table,value,yaml,yaml}, --format {html,json,json,shell,table,value,yaml,yaml}
                        the output format, defaults to table

[...]

Akihiro Motoki (amotoki)
summary: - liberty: two json/yaml formatters for list/show command
+ liberty: two json/yaml formatters for list/show command if cliff 1.15.0
+ is installed
summary: liberty: two json/yaml formatters for list/show command if cliff 1.15.0
- is installed
+ (and cliff-tablib) is installed
Revision history for this message
Akihiro Motoki (amotoki) wrote :

There are several options:

* Remove json and yaml formatters from cliff-tablib
    This addresses the situation if the latest cliff and cliff-tablib are installed
* Add workaround to use one formatter per format (a formatter from cliff ) if two formatters are detected.

Thought?

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

@Akihiro, there is an existing bug in OSC that is similar to this, and you summed it up perfectly.

I advised the bug reporter to not use cliff-tablib and to uninstall it. cliff-tablib is unmaintained, does not build successfully and has not been released for a long time. I'm not so concerned that folks are using it for non-openstack purposes, since it was created with openstackclient in mind.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

cliff-tablib 2.0.0 removes the duplicate formatters.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Thanks Doug for releasing a new version of cliff-tablib.

Changed in python-neutronclient:
status: New → Won't Fix
Changed in python-openstackclient:
status: New → Invalid
Changed in python-cliff:
status: New → Invalid
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.