X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tutorials%2FvFWDT%2Fworkflow%2Fworkflow.py;fp=tutorials%2FvFWDT%2Fworkflow%2Fworkflow.py;h=dd15e81779e9ca913a3dfae37ad1655300a0d46d;hb=bba7ed02826fa1f33189eb1d2d43c74a0d45fe83;hp=0b2b6039e8f7bf19720484665c753b837655c923;hpb=3069ed97314d524296e31fab39833d4af9cf1e19;p=demo.git diff --git a/tutorials/vFWDT/workflow/workflow.py b/tutorials/vFWDT/workflow/workflow.py index 0b2b6039..dd15e817 100755 --- a/tutorials/vFWDT/workflow/workflow.py +++ b/tutorials/vFWDT/workflow/workflow.py @@ -975,27 +975,27 @@ def _execute_lcm_requests(workflow, onap_ip, check_result): lcm_requests = workflow["requests"] print("WORKFLOW << {} >>".format(workflow["description"])) for i in range(len(lcm_requests)): - req = lcm_requests[i]["payload"] - #print(json.dumps(req, indent=4)) - print("APPC LCM << {} >> [{}]".format(req['input']['action'], lcm_requests[i]["description"])) - _set_appc_lcm_timestamp(req) - conf_result = False - result = appc_lcm_request(onap_ip, req) - print("Result {}".format(result)) - - if result == 100: - conf_result = confirm_appc_lcm_action(onap_ip, req, check_result) - #time.sleep(30) - elif result == 400: - conf_result = True - - if not conf_result: - if lcm_requests[i]["breakOnFailure"]: - raise Exception("APPC LCM << {} >> FAILED".format(req['input']['action'])) - elif "workflow" in lcm_requests[i]: - print("WORKFLOW << {} >> SKIP".format(lcm_requests[i]["workflow"]["description"])) - elif "workflow" in lcm_requests[i]: - _execute_lcm_requests(lcm_requests[i]["workflow"], onap_ip, check_result) + req = lcm_requests[i]["payload"] + #print(json.dumps(req, indent=4)) + print("APPC LCM << {} >> [{}]".format(req['input']['action'], lcm_requests[i]["description"])) + _set_appc_lcm_timestamp(req) + conf_result = False + result = appc_lcm_request(onap_ip, req) + print("Result {}".format(result)) + + if result == 100: + conf_result = confirm_appc_lcm_action(onap_ip, req, check_result) + #time.sleep(30) + elif result == 400: + conf_result = True + + if not conf_result: + if lcm_requests[i]["breakOnFailure"]: + raise Exception("APPC LCM << {} >> FAILED".format(req['input']['action'])) + elif "workflow" in lcm_requests[i]: + print("WORKFLOW << {} >> SKIP".format(lcm_requests[i]["workflow"]["description"])) + elif "workflow" in lcm_requests[i]: + _execute_lcm_requests(lcm_requests[i]["workflow"], onap_ip, check_result) def _generate_cdt_artifact_request(req_id, artifact, action, vnfc_type):