Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As i checked, default nova call glance client to query image metadata by using version 1 If i modify /usr/lib/python2.7/site-packages/nova/image/api.py as below and query again, version 2 of glance api will be called and i got right result that i wanted.

-70     def get(self, context, id_or_uri, include_locations=False,
+70     def get(self, context, id_or_uri, include_locations=True,
[root@controller ~]# nova image-show 32293c92-36ff-4928-a48e-4492a16107d7
+----------------------+--------------------------------------+
| Property             | Value                                |
+----------------------+--------------------------------------+
| OS-EXT-IMG-SIZE:size | 13287936                             |
| created              | 2016-05-08T08:55:58Z                 |
| id                   | 32293c92-36ff-4928-a48e-4492a16107d7 |
| minDisk              | 0                                    |
| minRam               | 0                                    |
| name                 | cirros-0.3.4-x86_64                  |
| progress             | 100                                  |
| status               | ACTIVE                               |
| updated              | 2016-05-08T08:55:59Z                 |
+----------------------+--------------------------------------+

Now, new question is: how to specify glance api version to nova service, are there some configure item?