diff options
| author | Thuleau Édouard <thuleau@gmail.com> | 2011-09-16 11:20:38 +0200 |
|---|---|---|
| committer | Thuleau Édouard <thuleau@gmail.com> | 2011-09-16 11:20:38 +0200 |
| commit | 79cc91fcd1086c8de16fb4ba8a38bac31240f5e8 (patch) | |
| tree | 809e7d679628e855dd7b31d4f677c8f324c3e57f /plugins | |
| parent | e1d38ca90c259a44035cf3bd5ad17d9ca5d93472 (diff) | |
| parent | 23fefd17727966b0a1397f40b25bedcd668206d7 (diff) | |
Merged 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) |
