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=488bc613828fb99e9ded1cc4b5d25fcfdf739a0d;hpb=46ee9d6a67fa638e9f561e2e453a77b16bc62165;p=osm%2Fosmclient.git diff --git a/osmclient/common/wait.py b/osmclient/common/wait.py index 488bc61..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, - exc.message) + str(exc)) raise ClientException(message)