Ensure that correct exception is raised

ManagerError is a nsxlib exception and not a neutron one

Change-Id: I218a2c5ffd13dcd73c0557419d31cffd34e77c26
This commit is contained in:
Gary Kotton 2016-12-01 02:43:27 -08:00
parent 1471251c67
commit 862e916b19
1 changed files with 2 additions and 2 deletions

View File

@ -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')