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

added interconnected test case for operation occurrences test id 11.3.6

parent 17fe5bb2
Loading
Loading
Loading
Loading
+62 −1
Original line number Diff line number Diff line
@@ -166,6 +166,33 @@ Terminate a VNF Instance
    Check Operation Notification For Terminate    COMPLETED
    Check Postcondition VNF Terminate

GET status information about multiple VNF LCM Operation OCC 
    [Documentation]    Test ID: 7.3.1.11.2
    ...    Test title: GET status information about multiple VNF LCM Operation OCC
    ...    Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none   
    GET VNF LCM Operation occurrences
    Check HTTP Response Status Code Is    202
    Check HTTP Response Body Json Schema Is    VnfLcmOpOccs 

Get Individual VNF LCM Operation occurrence
    [Documentation]    Test ID: 7.3.1.12.2
    ...    Test title: Get Individual VNF LCM Operation occurrences
    ...    Test objective: The objective is to test that this method retrieve information about a VNF lifecycle management operation occurrence 
    ...    Pre-conditions: none
    ...    Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [1] v4.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get Individual VNF LCM Operation occurrence
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    VnfLcmOpOcc 
    Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor

GET Individual VNF Package [keyword]
    Log    Trying to get a VNF Package present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -445,6 +472,7 @@ Check HTTP Response Body Json Schema Is
Check Operation Occurrence Id existence
    ${vnfLcmOpOccId}=    Get Value From Json    ${response['headers']}    $..Location
    Should Not Be Empty    ${vnfLcmOpOccId}
    Set Global Variable    ${globalVnfLcmOpOccId}    ${vnfLcmOpOccId}

Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
@@ -572,3 +600,36 @@ Check resource not Instantiated
    Check VNF Instance    ${vnfid}
    Check HTTP Response Status Code Is    200
    Check VNF Status    ${response['body']['instantiationState']}     NOT_INSTANTIATED

GET VNF LCM Operation occurrences
    Log    Query status information about multiple VNF lifecycle management operation occurrences.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_lcm_op_occs
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}	

Get Individual VNF LCM Operation occurrence
    Log    Query status information about multiple VNF lifecycle management operation occurrences.
    Set Headers  {"Accept":"${ACCEPT}"}  
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Log    Execute Query and validate response
    Get    ${VNFM_API_ROOT}/${VNFM_API_NAME}/${VNFM_API_MAJOR_VERSION}/vnf_lcm_op_occs/${globalVnfLcmOpOccId}
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse}

Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor
    Run Keyword If    ${check_descriptors} == 1    Check Individual VNF LCM Operation Occurence Content
    
Check Individual VNF LCM Operation Occurence Content
    PARSE the Descriptor File
    Match the VNF LCM Operation Occurence Response Attributes with Descriptors
    
Match the VNF LCM Operation Occurence Response Attributes with Descriptors
    #Checking Response attributes with VNF Descriptors
    Should Be Equal As Strings    ${response['body']['changedInfo']['vnfdId']}    ${Descriptor_ID}
    Should Be Equal As Strings    ${response['body']['changedInfo']['vnfdVersion']}    ${Descriptor_Version}
    List Should Contain Value    ${VDU_IDs}    ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']}
    List Should Contain value    ${Storage_IDs}    ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']}
    List Should Contain Value    ${VirtualLink_IDs}    ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['virtualStorageDescId']}
 No newline at end of file
+24 −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 ***
Retrieve VNF instance Operation Occurences
    [Documentation]    Test ID: 11.3.6
    ...    Test title: Retrieve VNF instance Operation Occurences
    ...    Test objective: The objective is to test the interconnected case of VNF instance resource, creation, instantiation and retrieval of information about VNF lifecycle management operation occurrences
    ...    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
    VNF Instantiation
    GET status information about multiple VNF LCM Operation OCC
    Get Individual VNF LCM Operation occurrence

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ ${vnfSnapshotInfoId_InUse} snapshotId-of-a-resource-AlreadyInUse-bySomeOther-
${vnfSnapshotInfoId_creationIncomplete}    snapshotId-of-a-resource-whose-creation-isn't-complete
${invalidVnfSnapshotInfoId}
${vnfSnapshotPkgId}
${globalVnfLcmOpOccId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfLcmOpOccId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${notExistingVnfLcmOpOccId}    6fc3539c-e602-4afa-8e13-962fb5a7d81d
${vnfLcmOpOccIdNotStartingProcessingRollingback}    6fc3539c-e602-4afa-8e13-962fb5a7d81d