OpenStack Havana comes with Glance's v1 and v2 API.

python-glanceclient fully supports v1 while support for v2 is in progress.

v2 adds some cool stuff including:

  • The ability to share images with specific users or projects
  • Image tagging
  • Schemas: Gets a JSON-schema document that represents an image or image-entity

One particular useful feature is direct-url metadata which allows one to see where a particular image resides.

Here's how to enable it:

Modify /etc/glance/glance-api.conf

show_image_direct_url = True

Restart Glance Services

service glance-api restart
service glance-registry restart

Utilize v2 API to Display Direct-Url

glance --os-image-api-version 2 image-show b9f44c5c-fc27-4891-b246-2df086f32ed7

+------------------+--------------------------------------------------------------------+
| Property         | Value                                                              |
+------------------+--------------------------------------------------------------------+
| checksum         | 4296b4c64655746fd44b7239fb66cf07                                   |
| container_format | bare                                                               |
| created_at       | 2014-03-07T23:30:00Z                                               |
| direct_url       | file:///var/lib/glance/images/b9f44c5c-fc27-4891-b246-2df086f32ed7 |
| disk_format      | qcow2                                                              |
| id               | b9f44c5c-fc27-4891-b246-2df086f32ed7                               |
| min_disk         | 0                                                                  |
| min_ram          | 0                                                                  |
| name             | cirros-qcow2                                                       |
| protected        | False                                                              |
| size             | 13139456                                                           |
| status           | active                                                             |
| tags             | []                                                                 |
| updated_at       | 2014-03-07T23:30:00Z                                               |
| visibility       | public                                                             |
+------------------+--------------------------------------------------------------------+


Comments

comments powered by Disqus