Commit 681a2681 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

[test-new][SOL003][VNF-LCM][v5.3.1][7.3.1.43.1...

[test-new][SOL003][VNF-LCM][v5.3.1][7.3.1.43.1 Test-IDs][NFVSOL(25)0000384,NFVSOL(26)000019r3] Added missing robot file for new implemented workflow test in SOL003 VNF LCM - item #28 in NFVSOL(26)000019r3.
parent 23f75108
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
*** Settings ***
Resource    VnfLcmMntOperationKeywords.robot
Resource    SubscriptionKeywords.robot
Resource    environment/variables.txt 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}     ssl_verify=false
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Suite Setup    Check resource existence

*** Test Cases ***
Change current VNF Package workflow 
    [Documentation]    Test ID: 7.3.1.43.1
    ...    Test title: Change current VNF Package workflow 
    ...    Test objective: The objective is to test the workflow for the change of current VNF Package.
    ...    Pre-conditions: VNF instance in in INSTANTIATED state. NFVO is subscribed to VNF LCM Operation Occurrence notifications 
    ...    Reference: Clause 5.4.4 - ETSI GS NFV-SOL 003 [1] v5.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: VNF instance still in INSTANTIATED state         
    Send Change Current VNF Package Request
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location
    Check Operation Occurrence Id existence
    Check Operation Notification For Change Current VNF Package    STARTING
    Check Operation Notification For Change Current VNF Package    PROCESSING
    Check Operation Notification For Change Current VNF Package    COMPLETED
    Check Postcondition VNF Status  INSTANTIATED 

*** Keywords ***
Check Operation Notification For Change Current VNF Package
    [Arguments]    ${status}
    Run Keyword If    ${SKIP_INTERMEDIATE_NOTIFICATION_CHECKS} == 0 or (${SKIP_INTERMEDIATE_NOTIFICATION_CHECKS} == 1 and '${status}' == 'COMPLETED')    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}

Check Postcondition VNF Status
    [Arguments]    ${status}
    Log    Retrieve VNF Instance
    Check VNF Instance    ${vnfInstanceId}
    Should Not Be Empty    ${response}
    Check HTTP Response Status Code Is    200
    Should Be Equal    ${response['body']['id']}    ${vnfInstanceId}    
    Check HTTP Response Header Contains    Content-Type
    Check HTTP Response Body Json Schema Is    vnfInstance.schema.json
    Check VNF Status    ${response['body']['instantiationState']}    ${status}

Check resource existence
    Set Headers    {"Accept":"${ACCEPT}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} 
    Integer    response status    200
 No newline at end of file