Hello.

I'm trying to use openstack SDK in my python code.

I want to upload image and set few properties. And I can't.

My code (without properties):

from openstack import connection
import os
con=connection.Connection(auth_url=os.environ['OS_AUTH_URL'], project_name = os.environ['OS_TENANT_NAME'], username=os.environ['OS_USERNAME'], password=os.environ['OS_PASSWORD'] con.image.upload_image(name='killme', data=file('/tmp/1','r'), disk_format="qcow2", container_format="bare")


with properties (few different attempts):

con.image.upload_image(name='killme', data=file('/tmp/1','r'), disk_format="qcow2", container_format="bare", foo="bar") #ignored

con.image.upload_image(name='killme', data=file('/tmp/1','r'), disk_format="qcow2", container_format="bare", properties="foo=bar") #set property 'properties' to 'foo=bar'

con.image.upload_image(name='killme', data=file('/tmp/1','r'), disk_format="qcow2", container_format="bare", properties={"foo":"bar"}) #return http error


How can I set properties for images via openstack SDK? This behavior is bug or feature?


_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

Reply via email to