Neutron 'list' commands do not display 'fields' when there are no resources

Bug #1401831 reported by vishal yadav
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
Confirmed
Undecided
vishal yadav

Bug Description

Neutron 'list commands' do not display 'fields' when there are no resources available.

neutron --version - 2.3.4
tenant - admin

Examples:
1) (Neutron) When there is no network:
[devbox@localhost devstack]$ neutron net-list

2) (Neutron) When there is no subnet:
[devbox@localhost devstack]$ neutron subnet-list

3) (Neutron) When there is no router:
[devbox@localhost devstack]$ neutron router-list

4) (Nova) When there is no instance:
[devbox@localhost devstack]$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

5) (Cinder) When there is no volume:
[devbox@localhost devstack]$ cinder list
+----+--------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+----+--------+--------------+------+-------------+----------+-------------+
+----+--------+--------------+------+-------------+----------+-------------+

Neutron client should also display 'fields' when there are no resources:
1) To keep consistent behaviour with other OpenStack clients.
2) User should get the idea what information will be displayed about the resources even though there are no corresponding network resources.

Changed in python-neutronclient:
assignee: nobody → vishal yadav (vishalcdac07)
Revision history for this message
Sripriya (sseetha) wrote :

Can you please confirm if this is a bug and change the status to 'Confirmed'?

Changed in python-neutronclient:
status: New → Confirmed
Revision history for this message
vishal yadav (vishalcdac07) wrote :

It is a bug either with priority 'low' or 'wishlist.

Sripriya (sseetha)
Changed in python-neutronclient:
assignee: vishal yadav (vishalcdac07) → Sripriya (sseetha)
Changed in python-neutronclient:
assignee: Sripriya (sseetha) → vishal yadav (vishalcdac07)
Revision history for this message
vishal yadav (vishalcdac07) wrote :

While going through related issues, I found below bugs which are reason for this limitation (prettytable 0.6 and cliff dependencies)
- https://bugs.launchpad.net/python-neutronclient/+bug/1165962
- https://bugs.launchpad.net/python-neutronclient/+bug/1265926

Though above bugs were fixed to prevent gate failures, limitation to display empty lines for "list command" output in case of no resource still persists.

I am wondering if this limitation has been fixed in cliff (to behave similar to prettytable-0.7.2) to display formatted output in case of empty resource as specified in https://bugs.launchpad.net/python-neutronclient/+bug/1165962/comments/2

What about other python-*clients (nova, cinder, glance etc.) which are currently using prettytable>=0.6,<0.8? I am not sure if these clients are using cliff.

affects: python-neutronclient → python-cliff
Revision history for this message
Terry Howe (thowe-g) wrote :

I disagree that headers should be displayed if there is no data. It could also cause variations on the headers that are displayed in the data/no data cases which would be confusing. Sometimes the headers are dependent on the data that is available like if there is a --long option.

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.