summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-09-14 15:30:27 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2011-09-14 15:30:27 -0700
commitf31748460180aeff00f08b70b6134b63faf293fa (patch)
tree253efbae9d1185df763d354d9c2f0c6214845c9c /plugins
parentd0daaaa320ecb408e721d5e856676a87d7e98ea6 (diff)
parentb7997e4f3257304229045d75e23749520630ed10 (diff)
merge trunk
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)