Ensure that correct exception is raised
ManagerError is a nsxlib exception and not a neutron one Change-Id: I218a2c5ffd13dcd73c0557419d31cffd34e77c26
This commit is contained in:
parent
1471251c67
commit
862e916b19
@ -157,12 +157,12 @@ class NsxLibApiBase(object):
|
||||
err_msg = (_("Could not find %(resource)s %(name)s") %
|
||||
{'name': name_or_id, 'resource': resource})
|
||||
# TODO(aaron): improve exception handling...
|
||||
raise exceptions.ManagerError(details=err_msg)
|
||||
raise nsxlib_exceptions.ManagerError(details=err_msg)
|
||||
elif len(matched_results) > 1:
|
||||
err_msg = (_("Found multiple %(resource)s named %(name)s") %
|
||||
{'name': name_or_id, 'resource': resource})
|
||||
# TODO(aaron): improve exception handling...
|
||||
raise exceptions.ManagerError(details=err_msg)
|
||||
raise nsxlib_exceptions.ManagerError(details=err_msg)
|
||||
|
||||
return matched_results[0].get('id')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user