Commit 17fe5bb2 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

udpated VNF instance termination test ID 11.3.5

parent 57e4a4db
Loading
Loading
Loading
Loading
+41 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ VNF Instantiation
    ...    Test title: VNF Instantiation workflow
    ...    Test objective: The objective is to test the workflow for the instantiation of a VNF instance
    ...    Pre-conditions: VNF instance resources is already created. NFVO is subscribed to VNF LCM Operation Occurrence notifications 
    ...    Reference: Clause 5.4.4 - ETSI GS NFV-SOL 003 [1] v4.4.1
    ...    Reference: Clause 5.4.4 - ETSI GS NFV-SOL 003 [1] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  NFVO is able to receive notifications from VNFM
    ...    Post-Conditions: VNF instance in INSTANTIATED state
@@ -148,6 +148,24 @@ POST Terminate a vnfInstance
    Check HTTP Response Header Contains    Location
    Check Individual VNF LCM operation occurrence operationState is    STARTING

Terminate a VNF Instance
    [Documentation]    Test ID: 7.3.1.33.1
    ...    Test title: Terminate a VNF Instance
    ...    Test objective: The objective is to terminate a VNF instance.
    ...    Pre-conditions: VNF instance in INSTANTIATED state 
    ...    Reference: Clause 5.3.3 - ETSI GS NFV-SOL 003 [1] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: NFVO is able to receive notifications from VNFM. 
    ...    Post-Conditions: VNF instance in NOT_INSTANTIATED state 
    Send Terminate VNF Request
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id existence
    Check Operation Notification For Terminate    STARTING
    Check Operation Notification For Terminate    PROCESSING
    Check Operation Notification For Terminate    COMPLETED
    Check Postcondition VNF Terminate

GET Individual VNF Package [keyword]
    Log    Trying to get a VNF Package present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -532,3 +550,25 @@ Check VNF Status
    [Arguments]    ${current}    ${expected}
    Should Be Equal As Strings    ${current}    ${expected}
    Log    VNF Status in the correct status

Send Terminate VNF Request
    Log    Trying to terminate 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}"}
    ${body}=    Get File    jsons/terminateVnfRequest.json
    Post    ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_instances/${vnfid}/terminate    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}

Check Operation Notification For Terminate 
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check Postcondition VNF Terminate
    Check resource not Instantiated

Check resource not Instantiated
    Check VNF Instance    ${vnfid}
    Check HTTP Response Status Code Is    200
    Check VNF Status    ${response['body']['instantiationState']}     NOT_INSTANTIATED
 No newline at end of file
+13 −3
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 terminate a VNF instance
Terminate an individual VNF instance
    [Documentation]    Test ID: 11.3.5
    ...    Test title: Terminate an individual VNF instance
    ...    Test objective: The objective is to test the interconnected case of VNF instance resource creation, instantiation and termination
    ...    Pre-conditions: none
    ...    Reference: ETSI GS NFV-SOL 003 [1] v4.5.1
    ...    Config ID: Config_prod_NFVO, Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Package
    POST Create a new vnfInstance
    Instantiate a vnfInstance
    POST Terminate a vnfInstance
    VNF Instantiation
    Terminate a VNF Instance