Merge "NSX|V3 Admin utils expect different notFound error"

This commit is contained in:
Jenkins 2017-08-30 08:23:21 +00:00 committed by Gerrit Code Review
commit 340f413a3b
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ def delete_backend_network(resource, event, trigger, **kwargs):
# check if the network exists
try:
nsxlib.logical_switch.get(nsx_id, silent=True)
except nsx_exc.BackendResourceNotFound:
except nsx_exc.ResourceNotFound:
# prevent logger from logging this exception
sys.exc_clear()
LOG.warning("Backend network %s was not found.", nsx_id)
@ -125,7 +125,7 @@ def delete_backend_network(resource, event, trigger, **kwargs):
# through errors
try:
nsxlib.logical_switch.get(nsx_id, silent=True)
except nsx_exc.BackendResourceNotFound:
except nsx_exc.ResourceNotFound:
# prevent logger from logging this exception
sys.exc_clear()
LOG.info("Backend network %s was deleted.", nsx_id)

View File

@ -141,7 +141,7 @@ def delete_backend_router(resource, event, trigger, **kwargs):
# check if the router exists
try:
nsxlib.logical_router.get(nsx_id, silent=True)
except nsx_exc.BackendResourceNotFound:
except nsx_exc.ResourceNotFound:
# prevent logger from logging this exception
sys.exc_clear()
LOG.warning("Backend router %s was not found.", nsx_id)
@ -163,7 +163,7 @@ def delete_backend_router(resource, event, trigger, **kwargs):
# throws errors
try:
nsxlib.logical_router.get(nsx_id, silent=True)
except nsx_exc.BackendResourceNotFound:
except nsx_exc.ResourceNotFound:
# prevent logger from logging this exception
sys.exc_clear()
LOG.info("Backend router %s was deleted.", nsx_id)