Merge "Fix kwargs passed to exception to get better format of error message"
This commit is contained in:
commit
f426b7eb7a
@ -2031,6 +2031,6 @@ class SCCommonDriver(driver.ManageableVD,
|
||||
'back-end or resolve primary system issues and '
|
||||
'fail back to reenable full functionality.')
|
||||
LOG.error(msg)
|
||||
raise exception.Invalid(reason=msg)
|
||||
raise exception.Invalid(msg)
|
||||
|
||||
return True
|
||||
|
@ -282,7 +282,7 @@ class DotHillCommon(object):
|
||||
err = (_("Unable to get stats for backend_name: %s") %
|
||||
self.backend_name)
|
||||
LOG.exception(err)
|
||||
raise exception.Invalid(reason=err)
|
||||
raise exception.Invalid(err)
|
||||
|
||||
stats['pools'].append(pool)
|
||||
self.stats = stats
|
||||
|
@ -1606,7 +1606,7 @@ class FJDXCommon(object):
|
||||
'Error: Volume is in Busy state')
|
||||
% {'cpsession': cpsession,
|
||||
'operation': operation})
|
||||
raise exception.VolumeIsBusy(data=msg)
|
||||
raise exception.VolumeIsBusy(msg)
|
||||
elif rc != 0:
|
||||
msg = (_('_delete_copysession, '
|
||||
'copysession: %(cpsession)s, '
|
||||
|
@ -3221,12 +3221,12 @@ class HPE3PARCommon(object):
|
||||
if not (host_type == 'HPE3PARDriver'):
|
||||
reason = (_("Cannot retype from HPE3PARDriver to %s.") %
|
||||
host_type)
|
||||
raise exception.InvalidHost(reason)
|
||||
raise exception.InvalidHost(reason=reason)
|
||||
|
||||
sys_info = self.client.getStorageSystemInfo()
|
||||
if not (host_id == sys_info['serialNumber']):
|
||||
reason = (_("Cannot retype from one 3PAR array to another."))
|
||||
raise exception.InvalidHost(reason)
|
||||
raise exception.InvalidHost(reason=reason)
|
||||
|
||||
# Validate new_snap_cpg. A white-space snapCPG will fail eventually,
|
||||
# but we'd prefer to fail fast -- if this ever happens.
|
||||
|
@ -233,7 +233,7 @@ class RESTScheduler(object):
|
||||
# verify the method
|
||||
if method not in ('GET', 'POST', 'PUT', 'DELETE'):
|
||||
msg = _("Invalid HTTP method: %s") % method
|
||||
raise APIException(data=msg)
|
||||
raise APIException(msg)
|
||||
|
||||
# prepare the url
|
||||
url = "https://%s:%s/api/v1%s" % (self.host, self.port, endpoint)
|
||||
|
@ -319,7 +319,7 @@ class DataMotionMixin(object):
|
||||
desired_attributes=['relationship-status', 'mirror-state'])[0]
|
||||
if snapmirror.get('relationship-status') != 'quiesced':
|
||||
msg = _("SnapMirror relationship is not quiesced.")
|
||||
raise na_utils.NetAppDriverException(reason=msg)
|
||||
raise na_utils.NetAppDriverException(msg)
|
||||
|
||||
try:
|
||||
wait_for_quiesced()
|
||||
|
@ -139,7 +139,7 @@ def setup_api_trace_pattern(api_trace_pattern):
|
||||
except (re.error, TypeError):
|
||||
msg = _('Cannot parse the API trace pattern. %s is not a '
|
||||
'valid python regular expression.') % api_trace_pattern
|
||||
raise exception.InvalidConfigurationValue(reason=msg)
|
||||
raise exception.InvalidConfigurationValue(msg)
|
||||
API_TRACE_PATTERN = api_trace_pattern
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user