ChangeExternalVNFConnectivityWorkflow.robot 2.56 KB
Newer Older
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/variables.txt
Resource    environment/scaleVariables.txt
Resource    VnfLcmMntOperationKeywords.robot
Resource    SubscriptionKeywords.robot
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    
Library    OperatingSystem
Library    BuiltIn
Library    Collections
Library    JSONLibrary
Library    Process
Suite Setup    Initialize System
Suite Teardown    Terminate All Processes    kill=true


*** Test Cases ***
aureliano sinatra's avatar
aureliano sinatra committed
Change external connectivity of VNF Workflow
    [Documentation]    Test ID: 7.3.1.20
    ...    Test title: Change external connectivity of VNF Workflow
    ...    Test objective: The objective is to change the external connectivity of a VNF instance.
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: VNF instance in INSTANTIATED state 
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Reference: section 5.4.11 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Applicability: NFVO is able to receive notifications from VNFM. The VNFD supports the external connectivity change
    ...    Post-Conditions: VNF instance still in INSTANTIATED state and external connectivity of the VNF is changed
    Send Change Ext Connectivity Request
    Check HTTP Response Status Code Is    202
    Check HTTP Response Header Contains    Location 
    Check Operation Occurrence Id
mengxuan.zhao's avatar
mengxuan.zhao committed
    Check Operation Notification For Change Ext Connectivity    STARTING
    Check Operation Notification For Change Ext Connectivity    PROCESSING
    Check Operation Notification For Change Ext Connectivity    COMPLETED
    Check Postcondition VNF Change Ext Connectivity

*** Keywords ***
Initialize System
    Create Sessions
Elian Kraja's avatar
Elian Kraja committed
    ${body}=    Get File    jsons/changeExtVnfConnectivityRequest.json
    ${changeVnfExtConnectivityRequest}=    evaluate    json.loads('''${body}''')    json    
    
Precondition Checks
    Check resource instantiated
    ${LccnSubscriptions}=    Check subscriptions about one VNFInstance and operation type    ${vnfInstanceId}    VnfLcmOperationOccurrenceNotification    operationType=SCALE

Check Postcondition VNF Change Ext Connectivity
    Check resource instantiated
    ${extVLId}=    Get Vnf Ext Link Id    ${vnfInstanceId}
    Should be Equal    ${changeVnfExtConnectivityRequest["extVirtualLinks"][0]["id"]}    ${extVLId}
    
Create a new Grant - Sync - OPERATE
    Create a new Grant - Synchronous mode        ${vnfInstanceId}    ${vnfLcmOpOccId}    OPERATE
    
mengxuan.zhao's avatar
mengxuan.zhao committed
Check Operation Notification For Change Ext Connectivity 
    [Arguments]    ${status}
    Check Operation Notification    VnfLcmOperationOccurrenceNotification   ${status}