Merge "Try Fetching value from 'cluster' when raise exception"
This commit is contained in:
commit
db41ac898b
@ -142,7 +142,9 @@ class VolumeManageController(wsgi.Controller):
|
|||||||
volume['ref'],
|
volume['ref'],
|
||||||
**kwargs)
|
**kwargs)
|
||||||
except exception.ServiceNotFound:
|
except exception.ServiceNotFound:
|
||||||
msg = _("Host '%s' not found") % volume['host']
|
msg = _("%(name)s '%(value)s' not found") % {
|
||||||
|
'name': 'Host' if host else 'Cluster',
|
||||||
|
'value': host or cluster_name}
|
||||||
raise exception.ServiceUnavailable(message=msg)
|
raise exception.ServiceUnavailable(message=msg)
|
||||||
|
|
||||||
utils.add_visible_admin_metadata(new_volume)
|
utils.add_visible_admin_metadata(new_volume)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user