Skip to content
IndividualVNFInstance.robot 6.08 KiB
Newer Older
*** Settings ***
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    DependencyLibrary
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
mengxuan.zhao's avatar
mengxuan.zhao committed

*** Variables ***
${original_etag}    1234

*** Test Cases ***
Post Individual VNFInstance - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.2.1
    ...    Test title: Post Individual VNFInstance - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
aureliano sinatra's avatar
aureliano sinatra committed
    POST individual vnfInstance
aureliano sinatra's avatar
aureliano sinatra committed
	Check HTTP Response Status Code Is    405

Get Information about an individual VNF Instance
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.2
    ...    Test title: Get Information about an individual VNF Instance
    ...    Test objective: The objective is to create a new VNF instance resource
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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 individual vnfInstance
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    vnfInstance
mengxuan.zhao's avatar
mengxuan.zhao committed
PUT Individual VNFInstance - Method not implemented 
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.2.3
    ...    Test title: PUT Individual VNFInstance - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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 individual vnfInstance
    Check HTTP Response Status Code Is    405
    
PATCH Individual VNFInstance
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.4
    ...    Test title: PATCH Individual VNFInstance
    ...    Test objective: This method modifies an individual VNF instance resource
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: an existing VNF instance resource
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: VNFInstance modified
aureliano sinatra's avatar
aureliano sinatra committed
    PATCH individual vnfInstance
    Check HTTP Response Status Code Is    202
aureliano sinatra's avatar
aureliano sinatra committed
    Check Operation Occurrence Id existence
PATCH Individual VNFInstance Precondition failed
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.5
    ...    Test title: PATCH Individual VNFInstance Precondition failed
    ...    Test objective: The objective is to create a new VNF instance resource
    ...    Pre-conditions:  ETag mismatch
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: VNFInstance not modified
aureliano sinatra's avatar
aureliano sinatra committed
    PATCH individual vnfInstance
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is    ProblemDetails
PATCH Individual VNFInstance Conflict
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.6
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test title: PATCH Individual VNFInstance Conflict
    ...    Test objective: The objective is to test the conflict while modifying a VNF instance resource
    ...    Pre-conditions: another LCM operation is ongoing
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: VNFInstance not modified
aureliano sinatra's avatar
aureliano sinatra committed
    PATCH individual vnfInstance
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails

DELETE Individual VNFInstance
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.7
    ...    Test title: DELETE Individual VNFInstance
    ...    Test objective: The objective is to delete a VNF instance
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: the VNF instance resource is existing
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: VNFInstance deleted
aureliano sinatra's avatar
aureliano sinatra committed
    DELETE individual vnfInstance
    Check HTTP Response Status Code Is    204

DELETE Individual VNFInstance Conflict
aureliano sinatra's avatar
aureliano sinatra committed
     [Documentation]    Test ID: 7.3.1.2.8
    ...    Test title: DELETE Individual VNFInstance Conflict
    ...    Test objective: The objective is to verify that the deletion cannot be executed currently, due to a conflict with the state of the VNF instance resource. 
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Pre-conditions: VNF instance resource is in INSTANTIATED state
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.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
root's avatar
root committed
    ...    Post-Conditions: Resources are not deleted
aureliano sinatra's avatar
aureliano sinatra committed
    DELETE individual vnfInstance
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is    ProblemDetails
root's avatar
root committed
    Check resource existence
Get Information about an individual VNF Instance - Not Found
     [Documentation]    Test ID: 7.3.1.2.9
    ...    Test title: Get Information about an individual VNF Instance - Not Found
    ...    Test objective: The objective is to test that the retrieval of an individual VNF Instance fails when instance is not present.
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual vnfInstance
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
*** 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}"}
Najam UI Hassan's avatar
Najam UI Hassan committed
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} 
    Integer    response status    200