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
|
# check if the network exists
|
||||||
try:
|
try:
|
||||||
nsxlib.logical_switch.get(nsx_id, silent=True)
|
nsxlib.logical_switch.get(nsx_id, silent=True)
|
||||||
except nsx_exc.BackendResourceNotFound:
|
except nsx_exc.ResourceNotFound:
|
||||||
# prevent logger from logging this exception
|
# prevent logger from logging this exception
|
||||||
sys.exc_clear()
|
sys.exc_clear()
|
||||||
LOG.warning("Backend network %s was not found.", nsx_id)
|
LOG.warning("Backend network %s was not found.", nsx_id)
|
||||||
@ -125,7 +125,7 @@ def delete_backend_network(resource, event, trigger, **kwargs):
|
|||||||
# through errors
|
# through errors
|
||||||
try:
|
try:
|
||||||
nsxlib.logical_switch.get(nsx_id, silent=True)
|
nsxlib.logical_switch.get(nsx_id, silent=True)
|
||||||
except nsx_exc.BackendResourceNotFound:
|
except nsx_exc.ResourceNotFound:
|
||||||
# prevent logger from logging this exception
|
# prevent logger from logging this exception
|
||||||
sys.exc_clear()
|
sys.exc_clear()
|
||||||
LOG.info("Backend network %s was deleted.", nsx_id)
|
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
|
# check if the router exists
|
||||||
try:
|
try:
|
||||||
nsxlib.logical_router.get(nsx_id, silent=True)
|
nsxlib.logical_router.get(nsx_id, silent=True)
|
||||||
except nsx_exc.BackendResourceNotFound:
|
except nsx_exc.ResourceNotFound:
|
||||||
# prevent logger from logging this exception
|
# prevent logger from logging this exception
|
||||||
sys.exc_clear()
|
sys.exc_clear()
|
||||||
LOG.warning("Backend router %s was not found.", nsx_id)
|
LOG.warning("Backend router %s was not found.", nsx_id)
|
||||||
@ -163,7 +163,7 @@ def delete_backend_router(resource, event, trigger, **kwargs):
|
|||||||
# throws errors
|
# throws errors
|
||||||
try:
|
try:
|
||||||
nsxlib.logical_router.get(nsx_id, silent=True)
|
nsxlib.logical_router.get(nsx_id, silent=True)
|
||||||
except nsx_exc.BackendResourceNotFound:
|
except nsx_exc.ResourceNotFound:
|
||||||
# prevent logger from logging this exception
|
# prevent logger from logging this exception
|
||||||
sys.exc_clear()
|
sys.exc_clear()
|
||||||
LOG.info("Backend router %s was deleted.", nsx_id)
|
LOG.info("Backend router %s was deleted.", nsx_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user