Bug 986977 - cinder: --status --display-name only show case sensitive results
cinder: --status --display-name only show case sensitive results
Status: CLOSED UPSTREAM
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity low
: ---
: 5.0 (RHEL 7)
Assigned To: Eric Harney
Dafna Ron
storage
: Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 10:25 EDT by Dafna Ron
Modified: 2016-04-26 14:37 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
With this update, a case-insensitive search for resources is now possible in Block Storage (cinder). For example, the user can now run 'cinder list --status' with 'Available' instead of 'available'.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-01 12:35:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
debug info from cinder client (2.14 KB, text/plain)
2013-07-24 17:30 EDT, Eric Harney
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1314308 None None None Never

  None (edit)
Description Dafna Ron 2013-07-22 10:25:45 EDT
Description of problem:

there is no non case sensitive option to search volumes by --status --display-name 

so if I user status ERROR or Error instead of error I will get no results. 
of if I have a volume called RHEL but I search rhel I will get no results. 

Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:
1. create a volume with capital letters
2. run cinder list --display-name with non capital letters
3. run cinder list --status with Available instead of available 

Actual results:

the list is case sensitive and there is no way to ask for a non case sensitive search. 

Expected results:

we should have a case sensitive and non case sensitive search (such as -i)

Additional info:

[root@opens-vdsb ~(keystone_admin)]# cinder list --all-tenants --status error
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
| 68eca3bb-61d2-4031-bdeb-8eea28232dd8 | error  |     bbhb     |  10  |    dafna    |  false   |             |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
[root@opens-vdsb ~(keystone_admin)]# cinder list --all-tenants --status Error


[root@opens-vdsb ~(keystone_admin)]# cinder list --display-name bla
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| fb596f0d-30ff-4f74-b68e-41d14b791d9b | available |     bla      |  10  |    dafna    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[root@opens-vdsb ~(keystone_admin)]# cinder list --display-name Bla
[root@opens-vdsb ~(keystone_admin)]#
Comment 1 Dafna Ron 2013-07-23 05:05:05 EDT
please note that we will have the same for other cinder commands:

[root@opens-vdsb ~(keystone_admin)]# cinder snapshot-list --display-name Snap_Snap
[root@opens-vdsb ~(keystone_admin)]# cinder snapshot-list --display-name snap_snap
+--------------------------------------+--------------------------------------+--------+--------------+------+
|                  ID                  |              Volume ID               | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+--------+--------------+------+
| 7039d68f-e2c5-470b-a0f9-8592b72b155a | e8850125-6179-4083-89fd-84461a85d1c1 | error  |  snap_snap   |  10  |
+--------------------------------------+--------------------------------------+--------+--------------+------+
Comment 2 Eric Harney 2013-07-24 17:30:51 EDT
Created attachment 778001 [details]
debug info from cinder client
Comment 3 Eric Harney 2013-08-08 15:31:06 EDT
FWIW, the expectation is that the status field will be in lowercase.  If Cinder code sets it to strings like "ERROR" that is probably a bug.

For searching based on "display-name" for volumes or snapshots, yes, this is a valid enhancement request.
Comment 4 Sean Cohen 2014-04-29 08:44:50 EDT
Dafna, please open upstream
Thanks
Sean

Note You need to log in before you can comment on or make changes to this bug.