summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2011-09-17 07:47:45 +0100
committerMark McLoughlin <markmc@redhat.com>2011-09-17 07:47:45 +0100
commit05521b82b5bb381b72319b5b05e03b8eb35af6c8 (patch)
tree262e3992846293df6b996189ef875ad9b3fd608c /plugins
parent0bcfe0b990fb8df799df2c2bb95f324beeccc974 (diff)
parent0dc06712aa06a60a582938770a9555b9df90fa22 (diff)
Merge trunk to resolve nova/network/linux_net.py conflict
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)