Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/

Bug 1087045

Summary: V2 API image-show doesn't work with <image-name>
Product: [Community] RDO Reporter: Tzach Shefi <tshefi>
Component: openstack-glanceAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NOTABUG QA Contact: Dafna Ron <dron>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eglynn, fpercoco, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-14 10:22:30 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:
Attachments:
Description Flags
Glance api.log none

Description Tzach Shefi 2014-04-13 12:10:14 UTC
Created attachment 885881 [details]
Glance api.log

Description of problem:

Glance V2 API image-show <imageID> works fine, but when using <image-name> it fails. 

root@orange-vdse ~(keystone_admin)]# glance --os-image-api-version 2 image-show 9969c805-c5e6-4d4b-b9e3-dd867a06be08
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 64d7c1cd2b6f60c92c14662941cb7913     |
| container_format | bare                                 |
| created_at       | 2014-04-13T11:34:03Z                 |
| disk_format      | qcow2                                |
| id               | 9969c805-c5e6-4d4b-b9e3-dd867a06be08 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | tcms4755754v1                        |
| owner            | c7bff83ba61e47b892aa68f0e902af54     |
| protected        | False                                |
| size             | 13167616                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2014-04-13T11:34:04Z                 |
| visibility       | private                              |
+------------------+--------------------------------------+

[root@orange-vdse ~(keystone_admin)]# glance --os-image-api-version 2 image-show tcms4755754v1
Request returned failure status.
404 Not Found
No image found with ID tcms4755754v1
    (HTTP 404)


Version-Release number of selected component (if applicable):
RHEL7 
openstack-glance-2014.1-0.4.b3.el7.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. Upload image to glance
2. Using V2 API  image-show <imageID>     works fine
3. V2 API image-show <imageName>          Error doesn't work

Using V1 API works fine with both imageID and imageName


Actual results:

Request returned failure status.
404 Not Found
No image found with ID tcms4755754v1
    (HTTP 404)


Expected results:

Should show image details, as does in case of V2 API image-show <imageID>

Additional info:

Attached api.log

Comment 1 Flavio Percoco 2014-04-14 10:22:30 UTC
Using the name to get an image was removed from the API v2. This is also shown in the client help text for the API v2:

(openstack)phantom ~ $ glance --os-image-api-version 2 help image-show
usage: glance image-show <IMAGE_ID>

Describe a specific image.

Positional arguments:
  <IMAGE_ID>  ID of image to describe.