[Openstack] Nova-Glance Query

Amit Uniyal auniyal61 at gmail.com
Thu Sep 29 08:06:00 UTC 2016


Hi,

I found the Solution, so thought to share with all.... and Brian one of
member here also confirmed, so i believe its correct.


So while creating metadata what i was doing wrong is, metadata={key:value},
if my value is integer i was passing it as it is. while i need pass it as
string.

so,
now i used

image_obj.manager.set_meta({'key':'value'})

and it works fine.... values are set properly and vm also launched
successfully.

The reason is Glance stores everything as a string.


Regards

On Wed, Sep 28, 2016 at 12:15 PM, Amit Uniyal <auniyal61 at gmail.com> wrote:

> Hi,
>
> I am using python-openstackclient and os_client_config
>
> My requirement is, i want to update, my image metadata ....
>
> i made two objects, by which i think i may achieve it:
>
> nova = os_client_config.make_client('compute')
> glance = os_client_config.make_client('images')
>
> example: metadata = {'hw_numa_nodes': 2,}
>
>
> i tried it many things, but not get succeed,  like:
>
> n_im = nova.images.get(<image_id>)
>
> nova.images.set_meta(n_im, metadata), or
> n_im.manager.set_meta(n_im, metadata)
>
>
>  ........ and many other also ..
>
> please suggest what would be the proper way to do it,
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160929/4268cdab/attachment.html>


More information about the Openstack mailing list