ScaleVNFTask.robot 4.6 KB
Newer Older
mengxuan.zhao's avatar
mengxuan.zhao committed
*** Settings ***
Resource    environment/variables.txt
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}     ssl_verify=false
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
aureliano sinatra's avatar
aureliano sinatra committed
Resource    VnfLcmMntOperationKeywords.robot
Suite Setup    Check resource existence
mengxuan.zhao's avatar
mengxuan.zhao committed

*** Test Cases ***
aureliano sinatra's avatar
aureliano sinatra committed
POST Scale a vnfInstance
    [Documentation]    Test ID: 7.3.1.4.1
    ...    Test title: POST Scale a vnfInstance
    ...    Test objective: The objective is to scale a VNF instance
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    POST Scale vnfInstance  
aureliano sinatra's avatar
aureliano sinatra committed
    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

aureliano sinatra's avatar
aureliano sinatra committed
POST Scale a vnfInstance Conflict (Not-Instantiated)
    [Documentation]    Test ID: 7.3.1.4.2
    ...    Test title: POST Scale a vnfInstance Conflict (Not-Instantiated)
    ...    Test objective: The objective is to verify that the scale operation cannot be executed 
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions:  VNF instance resource is in NOT-INSTANTIATED state
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Scale vnfInstance with VNF NOT-INSTANTIATED 
aureliano sinatra's avatar
aureliano sinatra committed
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails 
mengxuan.zhao's avatar
mengxuan.zhao committed
    
aureliano sinatra's avatar
aureliano sinatra committed
POST Scale a vnfInstance Not Found
     [Documentation]    Test ID: 7.3.1.4.3
    ...    Test title: POST Scale a vnfInstance Not Found
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test objective: The objective is to verify that the operation cannot be executed currently, because the VNF instance resource is not found. 
    ...    Pre-conditions: none  
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Scale vnfInstance with not existing VNF
aureliano sinatra's avatar
aureliano sinatra committed
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails 
mengxuan.zhao's avatar
mengxuan.zhao committed
   
mengxuan.zhao's avatar
mengxuan.zhao committed
GET Scale VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.4.4
    ...    Test title: GET Scale VNFInstance - Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented
    ...    Pre-conditions:  none
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Scale vnfInstance
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed

mengxuan.zhao's avatar
mengxuan.zhao committed
PUT Scale VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.4.5
    ...    Test title: PUT Scale VNFInstance - Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented
    ...    Pre-conditions: none  
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.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 Scale vnfInstance
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed

mengxuan.zhao's avatar
mengxuan.zhao committed
PATCH Scale VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.4.6
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: PATCH Scale VNFInstance - Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented
    ...    Pre-conditions: none 
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.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 Scale vnfInstance
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
    
mengxuan.zhao's avatar
mengxuan.zhao committed
DELETE Scale VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.4.7
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: DELETE Scale VNFInstance - Method not implemented
    ...    Test objective: The objective is to verify that the method is not implemented
    ...    Pre-conditions: none  
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.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 Scale 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_HEADER}":"${AUTHORIZATION_TOKEN}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} 
    Integer    response status    200