Merge "NSX|V3 Admin utils expect different notFound error"
This commit is contained in:
commit
340f413a3b
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user