diff --git a/manila/share/drivers/quobyte/jsonrpc.py b/manila/share/drivers/quobyte/jsonrpc.py index ba4b60ec62..df752802ea 100644 --- a/manila/share/drivers/quobyte/jsonrpc.py +++ b/manila/share/drivers/quobyte/jsonrpc.py @@ -59,7 +59,9 @@ class JsonRpc(object): self._cert_file = cert_file @utils.synchronized('quobyte-request') - def call(self, method_name, user_parameters, expected_errors=[]): + def call(self, method_name, user_parameters, expected_errors=None): + if expected_errors is None: + expected_errors = [] # prepare request self._id += 1 parameters = {'retry': 'INFINITELY'} # Backend specific setting @@ -103,7 +105,9 @@ class JsonRpc(object): LOG.debug("Backend request resulted in error: %s", result.text) result.raise_for_status() - def _checked_for_application_error(self, result, expected_errors=[]): + def _checked_for_application_error(self, result, expected_errors=None): + if expected_errors is None: + expected_errors = [] if 'error' in result and result['error']: if 'message' in result['error'] and 'code' in result['error']: if result["error"]["code"] in expected_errors: diff --git a/manila/share/drivers/quobyte/quobyte.py b/manila/share/drivers/quobyte/quobyte.py index cce58aa98d..1b21ac247a 100644 --- a/manila/share/drivers/quobyte/quobyte.py +++ b/manila/share/drivers/quobyte/quobyte.py @@ -78,9 +78,10 @@ class QuobyteShareDriver(driver.ExecuteMixin, driver.ShareDriver,): 1.2.3 - Updated RPC layer for improved stability 1.2.4 - Fixed handling updated QB API error codes 1.2.5 - Fixed two quota handling bugs + 1.2.6 - Fixed volume resize and jsonrpc code style bugs """ - DRIVER_VERSION = '1.2.5' + DRIVER_VERSION = '1.2.6' def __init__(self, *args, **kwargs): super(QuobyteShareDriver, self).__init__(False, *args, **kwargs)