diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-09-15 10:07:58 -0400 |
|---|---|---|
| committer | Dan Prince <dan.prince@rackspace.com> | 2011-09-15 10:07:58 -0400 |
| commit | 9c431227549a8df740b94e1adfda99b52322b2fb (patch) | |
| tree | 55d99bfd2deded8a940c12c2e9bd881597d9259c /plugins | |
| parent | 6fafde1fa52d1eba0c77f403b9e2a6f77b5379cd (diff) | |
| parent | b7997e4f3257304229045d75e23749520630ed10 (diff) | |
Merge w/ 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) |
