Commit a9b26ea1 authored by Mudassar Khan's avatar Mudassar Khan
Browse files

add check if operation resource state is in failed temp then perfrom retry operation

parent ccc90e54
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -849,6 +849,16 @@ Get Vnf Scale Info
    ${scaleInfo}=    Get Value From Json    ${vnfInstance}    $..scaleStatus
    [Return]   ${scaleInfo} 

Check operation resource state is FAILED_TEMP
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_lcm_op_occs/${globalVnfLcmOpOccId}
    ${outputResponse}=    Output    response
    ${state}=    Set Variable    ${outputResponse['body']['instantiationState']}
    Log    Current operation state: ${state}
    Run Keyword If    "${state}" != "FAILED_TEMP"    
    ...    Pass Execution If    True    Skipping test: Operation state must be FAILED_TEMP but found ${state}
    Log    Operation resource state is FAILED_TEMP as expected

Post Retry operation
    Log    Retry a VNF lifecycle operation if that operation has experienced a temporary failure
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
+1 −0
Original line number Diff line number Diff line
@@ -19,4 +19,5 @@ Test that POST method initiates retrying a VNF lifecycle operation if the operat
    POST Create a new vnfInstance
    VNF Instantiation
    GET status information about multiple VNF LCM Operation OCC
    Check operation resource state is FAILED_TEMP
    Post Retry operation task
 No newline at end of file