Commit feb51567 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

[test-new][SOL003][IC-tests][v5.2.1][11.3.1.16.1 Test-ID] implemented new IC...

[test-new][SOL003][IC-tests][v5.2.1][11.3.1.16.1 Test-ID] implemented new IC test for retrying scale out operation
parent e7b25ec2
Loading
Loading
Loading
Loading
+31 −1
Original line number Diff line number Diff line
@@ -286,6 +286,14 @@ VNF Instance Scale Out
    Check Operation Notification For    COMPLETED
    Check Postcondition VNF    SCALE_OUT

VNF Instance Scale Out - will fail
    Send VNF Scale Out Request
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For    STARTING
    Check Operation Notification For    PROCESSING

Post Retry operation task
    [Documentation]    Test ID: 7.3.1.13.1
    ...    Test title: Post Retry operation task
@@ -890,6 +898,17 @@ Send VNF Scale Out Request
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

Send VNF Scale Out Request - will fail
    Log    Trying to scale a vnf Instance
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}  
    ${template}=    Get File    jsons/scaleVnfRequest.json
    ${body}=        Format String   ${template}     scaletype=${scaleOutType}    scaleAspectId=${scaleAspectId}
    Post    ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_instances/${vnfid}/scale    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

Send VNF Scale In Request
    Log    Trying to scale a vnf Instance
    Set Headers    {"Accept":"${ACCEPT}"}
@@ -941,6 +960,17 @@ Check operation resource state is 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

Check VNF LCM operation is failed
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Sleep    10s
    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"    AND    "${state}" != "FAILED"
    ...    Pass Execution If    True    Skipping test: Operation state must be failed but found ${state}
    Log    Operation resource state is failed 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}"}
+23 −0
Original line number Diff line number Diff line
*** Settings ***
Suite Setup       Initialize System
Suite Teardown    Terminate All Processes    kill=true
Resource          environment/variables.txt    # Generic Parameters
Resource          IC_TC_Keywords.robot
Library           JSONLibrary

*** Test Cases ***
Test that POST method initiates retrying a VNF Scale Out operation that fails
    [Documentation]    Test ID: 11.3.1.16.1
    ...    Test title: Test that POST method initiates retrying a VNF Scale Out operation that fails
    ...    Test objective: The objective is to test the interconnected case of VNF to retry a VNF scale out if the operation fails.
    ...    Pre-conditions: none
    ...    Reference: ETSI GS NFV-SOL 003 [1] v5.2.1
    ...    Config ID: Config_prod_NFVO, Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Package
    POST Create a new vnfInstance
    VNF Instantiation
    VNF Instance Scale Out - will fail
    Check VNF LCM operation is failed
    Post Retry operation task
 No newline at end of file