summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-09-10 13:56:54 -0400
committerDan Prince <dan.prince@rackspace.com>2011-09-10 13:56:54 -0400
commit9482275a60ab8caa546ec402f61c60b9f5e7e33f (patch)
treeeaede68bf30f50a3e8cea0d7e3f2e0b3481cd468 /plugins
parent128294ab9f5c03426ecb2154c48ea98186256d5b (diff)
downloadnova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.tar.gz
nova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.tar.xz
nova-9482275a60ab8caa546ec402f61c60b9f5e7e33f.zip
Update GlanceClient, GlanceImageService, and Glance Xen plugin to work with
Glance keystone.
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/glance6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
index a06312890..1a9ac37e9 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -252,7 +252,11 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port, os_type,
# NOTE(dprince): We need to resend any existing Glance meta/property
# headers so they are preserved in Glance. We obtain them here with a
# HEAD request.
- conn.request('HEAD', '/v1/images/%s' % image_id)
+ conn.putrequest('HEAD', '/v1/images/%s' % image_id)
+ if auth_token:
+ conn.putheader('x-auth-token', auth_token)
+ conn.endheaders()
+
resp = conn.getresponse()
if resp.status != httplib.OK:
raise Exception("Unexpected response from Glance %i" % resp.status)