Bug 986977 - cinder: --status --display-name only show case sensitive results
Summary: cinder: --status --display-name only show case sensitive results
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: 5.0 (RHEL 7)
Assignee: Eric Harney
QA Contact: Dafna Ron
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-22 14:25 UTC by Dafna Ron
Modified: 2016-04-26 18:37 UTC (History)
5 users (show)

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'.
Clone Of:
Environment:
Last Closed: 2014-05-01 16:35:05 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1314308 0 None None None Never

Description Dafna Ron 2013-07-22 14:25:45 UTC
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 09:05:05 UTC
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 21:30:51 UTC
Created attachment 778001 [details]
debug info from cinder client

Comment 3 Eric Harney 2013-08-08 19:31:06 UTC
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 12:44:50 UTC
Dafna, please open upstream
Thanks
Sean


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