ChangeExternalVNFConnectivityTask.robot 4.01 KB
Newer Older
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/variables.txt 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}     ssl_verify=false
aureliano sinatra's avatar
aureliano sinatra committed
Resource    VnfLcmMntOperationKeywords.robot
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

*** Test Cases ***
aureliano sinatra's avatar
aureliano sinatra committed
POST Change external VNF connectivity 
    [Documentation]    Test ID: 7.3.1.10.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: POST Change external VNF connectivity
    ...    Test objective: The objective is to test that POST method trigger a change in VNF external connectivity
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: in response header Location shall not be null         
aureliano sinatra's avatar
aureliano sinatra committed
    POST Change External VNF Connectivity
    Check HTTP Response Status Code Is    202
    Check Operation Occurrence Id existence
        
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
GET Change external VNF connectivity - Method not implemented
    [Documentation]    Test ID: 7.3.1.10.2
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: GET Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that GET method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.11.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

PUT Change external VNF connectivity - Method not implemented
    [Documentation]    Test ID: 7.3.1.10.3
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: PUT Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.11.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

PATCH Change external VNF connectivity - Method not implemented
    [Documentation]    Test ID: 7.3.1.10.4
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: PATCH Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.11.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
    
DELETE Change external VNF connectivity - Method not implemented
    [Documentation]    Test ID: 7.3.1.10.5
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: DELETE Change external VNF connectivity - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.11.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE Change External VNF Connectivity
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

*** Keywords ***
Check resource existence
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} 
    Integer    response status    200

Launch another LCM operation
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Elian Kraja's avatar
Elian Kraja committed
    ${body}=    Get File    jsons/scaleVnfRequest.json
    Post    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale    ${body}
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
    Integer    response status    202