Change patched glance client to fit glance-client code change

In Juno Release , "python-glanceclient" component changes code in the
 dir "glanceclient/common" to replace the old http client implementation
 in favor of a new one based on python-request. This leads to glance
driver image sync failed because of lack of http client attributes and
using the method that has never been in new httpclient.

Change-Id: I06419f792e949fed353277851f9f0f67ba38729d
Closes-Bug: #1349651

(cherry-picked from 20152f86f9)

Change-Id: I9c7f80b9f5849ac5d9d5f4b20d0ddd62074f2bfd
This commit is contained in:
Eric_Zhao 2014-07-29 02:35:38 -04:00 committed by Le Tian Ren
parent ccaa17da43
commit ab8291d971
1 changed files with 2 additions and 2 deletions

View File

@ -92,8 +92,8 @@ def patch_client(service_wrapper, client):
url = '/v2/images/%s' % image_id
hdrs = {'Content-Type': 'application/openstack-images-v2.1-json-patch'}
http_client._request('PATCH', url,
headers=hdrs,
data=image.patch)
headers=hdrs,
data=image.patch)
# NOTE(bcwaldon): calling image.patch doesn't clear the changes, so
# we need to fetch the image again to get a clean history. This is