Bug 987330

Summary: cinder: if illegal id is given for 'cinder snapshot-list --volume-id' no error is given
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: openstack-cinderAssignee: RHOS Maint <rhos-maint>
Status: CLOSED WONTFIX QA Contact: Haim <hateya>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eharney, fpercoco, scohen, yeylon
Target Milestone: ---Keywords: Improvement
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-11 09:07:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dafna Ron 2013-07-23 09:18:20 UTC
Description of problem:

if I run cinder snapshot-list --volume-id with id which is not in the id length instead of getting an error we simply get empty results. 

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

openstack-cinder-2013.1.2-3.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. create a snapshot for a volume 
2. run: cinder snapshot-list --volume-id <volumeID>
3. run: cinder snapshot-list --volume-id <name/ID with missing digits> 

Actual results:

instead of giving an error for id being illegal we have no results shown

Expected results:

if you give ID which is less than the normal length we should fail with error

Additional info:

[root@opens-vdsb ~(keystone_admin)]# cinder snapshot-list --volume-id e8850125-6179-4083-89fd-84461a85d1c1
+--------------------------------------+--------------------------------------+--------+--------------+------+
|                  ID                  |              Volume ID               | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+--------+--------------+------+
| 7039d68f-e2c5-470b-a0f9-8592b72b155a | e8850125-6179-4083-89fd-84461a85d1c1 | error  |  snap_snap   |  10  |
+--------------------------------------+--------------------------------------+--------+--------------+------+
[root@opens-vdsb ~(keystone_admin)]# cinder snapshot-list --volume-id e8850125-6179-4083-89fd-84461a
[root@opens-vdsb ~(keystone_admin)]# cinder snapshot-list --volume-id e8850125-6179