Set correctly request parameters for the list_resources request
The Neutron API requires that the content_type and accept headers are correcty set in the request. This commit permit to fix this issue. It has been successfully tested with Tox. Closes-Bug: 1754096 Change-Id: I977f97cd0692a86bac1d817fa1c4de27889f2675
This commit is contained in:
parent
9ab7f8299b
commit
db1a78a9c8
@ -85,6 +85,9 @@ class OpenStackNeutron(helpers.BaseHelper):
|
||||
:param tenant: include tenant in the query parameters
|
||||
"""
|
||||
path = "/%s" % resource
|
||||
if req:
|
||||
req.accept = "application/json"
|
||||
req.content_type = "application/json"
|
||||
os_req = self._make_get_request(req, path, parameters)
|
||||
response = os_req.get_response()
|
||||
return self.get_from_response(response, resource, [])
|
||||
|
Loading…
x
Reference in New Issue
Block a user