summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-09-13 07:49:03 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-09-13 07:49:03 -0700
commit8a9b192f5436fa53b58b713e193733ea677766cc (patch)
treede2e3cb0deb0266feabd23485b033fd40f7a85b3 /plugins
parent9ccefcaa44062f5aa2e562dd126e22d06a06c392 (diff)
parent9f39ff070b5500a0ccb9a6454995f97342254381 (diff)
we're back
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)