Merge "PowerStore driver - Request data validation fix"

This commit is contained in:
Zuul 2022-07-15 18:24:36 +00:00 committed by Gerrit Code Review
commit 9da4e15cae
2 changed files with 7 additions and 3 deletions

View File

@ -85,8 +85,6 @@ class PowerStoreClient(object):
payload=None,
params=None,
log_response_data=True):
if not payload:
payload = {}
if not params:
params = {}
request_params = {
@ -94,7 +92,7 @@ class PowerStoreClient(object):
"verify": self._verify_cert,
"params": params
}
if method != "GET":
if payload and method != "GET":
request_params["data"] = json.dumps(payload)
request_url = self.base_url + url
r = requests.request(method, request_url, **request_params)

View File

@ -0,0 +1,6 @@
---
fixes:
- |
PowerStore driver `bug #1981068
<https://bugs.launchpad.net/cinder/+bug/1981068>`_: Fixed
request data validation for the REST client.