How to setup image metadata with python API 0.11.0? [closed]

asked 2013-08-26 07:18:10 -0500

Skarab gravatar image

updated 2013-08-30 16:24:12 -0500

smaffulli gravatar image

I work with a DevStack-Grizzly installation. I add an image with metadata [see the code]. I use glance.images.create and provide metadata by properties argument. Unfortunately, the created image is without metadata (properties). image.get prints NONE.

import keystoneclient.v2_0.client as ksclient
import glanceclient

keystone = ksclient.Client(auth_url=credentials['auth-url'], username=credentials['username'],
                       password=credentials['password'], tenant_name=credentials['tenant'])

glance_endpoint = keystone.service_catalog.url_for(service_type='image',

glance = glanceclient.Client('1',glance_endpoint, token=keystone.auth_token)

with open( image_file ) as fimage:
            image = glance.images.create(name=image_name, is_public=True, disk_format="qcow2", container_format="bare", data=fimage, properties =  {"aaaa": "13", "'bbbbbb": "12"} )

print image.get() // prints NONE

Is there other way of setting image metadata?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by rbowen
close date 2016-06-21 14:54:39.141121


The version of OpenStack that this is opened against has been declared EOL as per Please open a new issue if you are still seeing this problem with a more recent, supported version of OpenStack. Thanks.

rbowen gravatar imagerbowen ( 2016-06-21 14:54:34 -0500 )edit