Don't reuse request and transport instances
Re-using these instances was causing request failures when talking to `uwsgi`. I still don't know the exact cause - probably something related to the headers or even cached in the `http.Client` instance - but this does fix the current issue and it also makes sense to have a new request object for every request. Change-Id: I30f78e048eea7105e4cced4530b165ad7a25d914
This commit is contained in:
@@ -49,6 +49,7 @@ class Flavor(object):
|
||||
data = {'pool': self.pool,
|
||||
'capabilities': self.capabilities}
|
||||
|
||||
req, trans = self.client._request_and_transport()
|
||||
core.flavor_create(trans, req, self.name, data)
|
||||
|
||||
def update(self, flavor_data):
|
||||
|
@@ -58,6 +58,7 @@ class Pool(object):
|
||||
if self.client.api_version >= 1.1:
|
||||
data['group'] = self.group
|
||||
|
||||
req, trans = self.client._request_and_transport()
|
||||
core.pool_create(trans, req, self.name, data)
|
||||
|
||||
def update(self, pool_data):
|
||||
|
Reference in New Issue
Block a user