<div dir="ltr">Hi,<div><br></div><div>I found the Solution, so thought to share with all.... and Brian one of member here also confirmed, so i believe its correct.</div><div><br></div><div><br></div><div>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.</div><div><br></div><div>so,</div><div>now i used </div><div><br></div><div>image_obj.manager.set_meta({'key':'value'}) </div><div><br></div><div>and it works fine.... values are set properly and vm also launched successfully.</div><div><br></div><div>The reason is Glance stores everything as a string.</div><div><br></div><div><br></div><div>Regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 12:15 PM, Amit Uniyal <span dir="ltr"><<a href="mailto:auniyal61@gmail.com" target="_blank">auniyal61@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am using python-openstackclient and os_client_config</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">My requirement is, i want to update, my image metadata ....</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">i made two objects, by which i think i may achieve it:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">nova = os_client_config.make_client('<wbr>compute')</div><div style="font-size:12.8px">glance = os_client_config.make_client('<wbr>images')</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">example: metadata = {'hw_numa_nodes': 2,}</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">i tried it many things, but not get succeed,  like:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">n_im = nova.images.get(<image_id>)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">nova.images.set_meta(n_im, metadata), or</div><div style="font-size:12.8px">n_im.manager.set_meta(n_im, metadata)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"> ........ and many other also ..</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">please suggest what would be the proper way to do it,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks</div></div>
</blockquote></div><br></div>