← Back to team overview

openstack team mailing list archive

Re: Glance, boto and image id

 

Apparently not. This is the output of glance image-show:

+-----------------------+--------------------------------------+
| Property              | Value                                |
+-----------------------+--------------------------------------+
| Property 'kernel_id'  | e1c78f4d-eca9-4979-9ee0-54019d5f79c2 |
| Property 'ramdisk_id' | 99c8443e-c3b2-4aef-8bf8-79cc58f127a2 |
| checksum              | 2f81976cae15c16ef0010c51e3a6c163     |
| container_format      | ami                                  |
| created_at            | 2012-12-04T22:59:13                  |
| deleted               | False                                |
| disk_format           | ami                                  |
| id                    | 67b612ac-ab20-4227-92fc-adf92841ba8b |
| is_public             | True                                 |
| min_disk              | 0                                    |
| min_ram               | 0                                    |
| name                  | cirros-0.3.0-x86_64-uec              |
| owner                 | ab267870ac72450d925a437f9b7c064a     |
| protected             | False                                |
| size                  | 25165824                             |
| status                | active                               |
| updated_at            | 2012-12-04T22:59:14                  |
+-----------------------+--------------------------------------+


Looking at the code in
https://github.com/openstack/nova/blob/master/nova/api/ec2/ec2utils.py#L70and
https://github.com/openstack/nova/blob/master/nova/api/ec2/ec2utils.py#L126it
seems that the conversion is simply done by getting an id of type
integer (not uuid-like string) and then converting it to hex form and
appending it to the string 'ami-'

Question is: where this id comes from and is there any way to show it in
the horizon web interface?

.a.


On Sun, Jan 13, 2013 at 10:17 PM, Jay Pipes <jaypipes@xxxxxxxxx> wrote:

> The EC2-style image ID would probably be stored in the custom key/value
> pairs in the Glance image record for the image... so if you do a glance
> image-show <IMAGE_UUID> you should see the EC2 image ID in there...
>
> -jay
>
> On 01/11/2013 09:51 AM, Antonio Messina wrote:
> > Hi all,
> >
> > I am using boto library to access an folsom installation, and I have a
> > few doubts regarding image IDs.
> >
> > I understand that boto uses ec2-style id for images (something like ami
> > ami-<16digit number>) and that nova API converts glance IDs to EC2 id.
> > However, it seems that there is no way from the horizon web interface
> > nor from euca-tools to get this mapping.
> >
> > How can I know the EC2 id of an image, having access only to the web
> > interface or boto?
> >
> > I could use the *name* of the instance instead of the ID, but the name
> > is not unique...
> >
> > .a.
> >
> > --
> > antonio.s.messina@xxxxxxxxx <mailto:antonio.s.messina@xxxxxxxxx>
> > GC3: Grid Computing Competence Center
> > http://www.gc3.uzh.ch/
> > University of Zurich
> > Winterthurerstrasse 190
> > CH-8057 Zurich Switzerland
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~openstack
> > Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~openstack
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>



-- 
antonio.s.messina@xxxxxxxxx
GC3: Grid Computing Competence Center
http://www.gc3.uzh.ch/
University of Zurich
Winterthurerstrasse 190
CH-8057 Zurich Switzerland

Follow ups

References