Formatter is broken in json output on single entities
Bug #1625518 reported by
Alexandr Kostrikov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Bulat Gaifullin | ||
Mitaka |
Fix Released
|
High
|
Bulat Gaifullin | ||
Newton |
Fix Committed
|
High
|
Bulat Gaifullin |
Bug Description
When I am trying to get information in json format I get a lot of messed information.
[root@nailgun ~]# fuel2 env show 1 -f json
[{"Field": "id", "Value": 1}, {"Field": "status", "Value": "new"}, {"Field": "fuel_version", "Value": "9.1"}, {"Field": "name", "Value": "test"}, {"Field": "release_id", "Value": 2}, {"Field": "is_customized", "Value": false}, {"Field": "changes", "Value": [{"node_id": null, "name": "attributes"}, {"node_id": null, "name": "networks"}, {"node_id": null, "name": "vmware_
[root@nailgun ~]#
Expected result:
Json output is kept simple and readable.
Additional info:
A lot of CI tests are bound to json output. It may cause a lot of failures.
Changed in fuel: | |
milestone: | 9.1 → 10.0 |
tags: | added: on-verification |
To post a comment you must log in.
The reason is in wrong formatter loading. Formatters provided by different python packages.
We have the same entry points provided by the cliff and cliff-tab packages: [1], [2].
Formatters in cliff are loaded by stevedore and get by name: [3], [4]. Thus if we have two entry points with same name unpredictable formatter would be used.
Last commit in cliff-tab package is dated by Jan 12, 2014. cliff-tab is required by network-checker, but it is not used in the code.
[1] https:/ /github. com/openstack/ cliff/blob/ master/ setup.cfg# L28-L40 /github. com/dreamhost/ cliff-tablib/ blob/master/ setup.py# L160-L171 /github. com/openstack/ stevedore/ blob/master/ stevedore/ extension. py#L279- L291 /github. com/openstack/ cliff/blob/ 0b1fc95247a4f46 694a84ae5a8df4e 94a5c5d5e0/ cliff/display. py#L99
[2] https:/
[3] https:/
[4] https:/