Skip to content
InstantiateVNFTask.robot 4.71 KiB
Newer Older
mengxuan.zhao's avatar
mengxuan.zhao committed
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/variables.txt 
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}     ssl_verify=false
Library    DependencyLibrary
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
aureliano sinatra's avatar
aureliano sinatra committed
Resource    VnfLcmMntOperationKeywords.robot
mengxuan.zhao's avatar
mengxuan.zhao committed

mengxuan.zhao's avatar
mengxuan.zhao committed

*** Test Cases ***
Instantiate a vnfInstance
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.3.1
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to instantiate a VNF instance
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: VNF instance resource is in NOT INSTANTIATED state
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.4.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: none
aureliano sinatra's avatar
aureliano sinatra committed
    POST instantiate individual vnfInstance
    Check HTTP Response Status Code Is    202
aureliano sinatra's avatar
aureliano sinatra committed
    Check Operation Occurrence Id existence
mengxuan.zhao's avatar
mengxuan.zhao committed

Instantiate a vnfInstance Conflict
    # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.3.2
    ...    Test title: Post Instantiate Individual VNFInstance 
    ...    Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
    ...    Pre-conditions: VNF instance resource is in INSTANTIATED state
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.4.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: none
aureliano sinatra's avatar
aureliano sinatra committed
    POST instantiate individual vnfInstance
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails 
mengxuan.zhao's avatar
mengxuan.zhao committed
    
GET Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.3.3
    ...    Test title: GET Instantiate Individual VNFInstance - 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.4.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
aureliano sinatra's avatar
aureliano sinatra committed
    GET instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed

PUT Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.3.4
    ...    Test title: PUT Instantiate Individual VNFInstance  - 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.4.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
aureliano sinatra's avatar
aureliano sinatra committed
    PUT instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed

PATCH Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.3.5
    ...    Test title: PATCH Instantiate Individual VNFInstance  - 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.4.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
aureliano sinatra's avatar
aureliano sinatra committed
    PATCH instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
    
DELETE Instantiate VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.3.6
    ...    Test title: DELETE Instantiate Individual VNFInstance  - 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.4.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
aureliano sinatra's avatar
aureliano sinatra committed
    DELETE instantiate individual vnfInstance   
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed

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

Check resource instantiated
    Set Headers    {"Accept":"${ACCEPT}"}  
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} 
    String    response body instantiationState    INSTANTIATED