X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fcommon%2Fwait.py;h=d8923ba988ab74f50ca3f31011c5f2a5795cb9d3;hb=refs%2Fchanges%2F17%2F8717%2F3;hp=96cb851634ea29d45fa7c6f74700de0f49ac9751;hpb=36253c72d4f7456d6a5b2a199d2e544e699f3d99;p=osm%2Fosmclient.git diff --git a/osmclient/common/wait.py b/osmclient/common/wait.py index 96cb851..d8923ba 100644 --- a/osmclient/common/wait.py +++ b/osmclient/common/wait.py @@ -18,7 +18,7 @@ OSM API handling for the '--wait' option """ -from osmclient.common.exceptions import ClientException +from osmclient.common.exceptions import ClientException, NotFound import json from time import sleep import sys @@ -28,6 +28,7 @@ TIMEOUT_GENERIC_OPERATION = 600 TIMEOUT_NSI_OPERATION = TIMEOUT_GENERIC_OPERATION TIMEOUT_SDNC_OPERATION = TIMEOUT_GENERIC_OPERATION TIMEOUT_VIM_OPERATION = TIMEOUT_GENERIC_OPERATION +TIMEOUT_K8S_OPERATION = TIMEOUT_GENERIC_OPERATION TIMEOUT_WIM_OPERATION = TIMEOUT_GENERIC_OPERATION TIMEOUT_NS_OPERATION = 3600 POLLING_TIME_INTERVAL = 5 @@ -191,7 +192,9 @@ def wait_for_status(entity_label, entity_id, timeout, apiUrlStatus, http_cmd, de # There was a timeout, so raise an exception raise ClientException('operation timeout, waited for {} seconds'.format(timeout)) except ClientException as exc: - message="Operation failed for {}:\nerror:\n{}".format( + if deleteFlag and isinstance(exc, NotFound): + return + message = "Operation failed for {}:\nerror:\n{}".format( entity_label, str(exc)) raise ClientException(message)