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