diff options
| author | Johannes Erdfelt <johannes.erdfelt@rackspace.com> | 2011-09-13 15:56:27 +0000 |
|---|---|---|
| committer | Johannes Erdfelt <johannes.erdfelt@rackspace.com> | 2011-09-13 15:56:27 +0000 |
| commit | ef7b0013d527b37edba3d3d41ac09a0a501ef3a7 (patch) | |
| tree | 9c6c019020afe27dc7c0fd8a78a8d5e236f516fa /plugins | |
| parent | 050be203cb43a12ca430eadfd30c87690b33b9cf (diff) | |
| parent | 61e5825a43fff1ad60dcd26454dc4881bdc13ef6 (diff) | |
Merge with trunk
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 6 |
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) |
