diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-09-21 09:00:18 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-09-21 09:00:18 +0000 |
| commit | a63ca427e75c73611dd129bc7b5a625f6c06fa44 (patch) | |
| tree | d80bef65fe63bb45fbf201f0c0475d3d699fa045 /plugins | |
| parent | 4d0bb8730a076b44d0a37fd0770c743b834e5751 (diff) | |
| parent | d9752d46554ffa87360bfd740177b40871cfbea6 (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) |
