diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-09-12 14:29:06 -0400 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-09-12 14:29:06 -0400 |
| commit | d5c4be43c60bcd5fa0fae130ad41f847e28d84fe (patch) | |
| tree | b8820ec4b9c127a5a63e1ec60b19db9e9e830cdc /plugins | |
| parent | 0611e3fc3165ce916d83b0fa421e6dafa2b2387e (diff) | |
| parent | 9482275a60ab8caa546ec402f61c60b9f5e7e33f (diff) | |
merging parent branch lp:~rackspace-titan/nova/glance-client-keystone
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) |
