diff options
| author | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-09-15 10:43:42 -0700 |
|---|---|---|
| committer | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-09-15 10:43:42 -0700 |
| commit | f8d751de0aef0b7b6afc9a2f0d8c427de24bb3a6 (patch) | |
| tree | 94f17f2ece7297cace3e5a42a400e0410bd5b0c6 /plugins | |
| parent | 5579ade405ce3318d4a5d33e68e39ee76c80b27c (diff) | |
| parent | c3654d48f8278d96003bf1d7d3a4bcbe2354f0b5 (diff) | |
Merged from trunk and resolved conflicts
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) |
