Commit 3f8cb890 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fix merge 4.3.1-dev into release-4

parents db0f00d8 981c0c3d
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -15,13 +15,21 @@ More information and download is available at [DGS/NFV-TST010ed431]().
The NFV API Conformance test specification is available in the following versions:

| TST010 Version       | SOL Specifications                                                                      | API Conformance Tests                                                      |
|----------------|-------------------------------------------------------------------------------------------|----------------------------------------------------------------|
|----------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------|
| v2.4.1             | SOL002 SOL003 SOL005 v2.4.1                                                      | [v2.4.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.4.1/) |
| v2.4.1-maintenance | SOL002 SOL003 SOL005 v2.4.1                                                      | [v2.4.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.4.1-fix-plu/) |
| v2.6.1             | SOL002 SOL003 SOL005 v2.6.1                                                      | [v2.6.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.6.1/) |
| v2.6.1-maintenance | SOL002 SOL003 SOL005 v2.6.1                                                      | [v2.6.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.6.1-fix-plu/) |
| v2.7.1             | SOL002 SOL003 SOL005 v2.7.1                                                      | [v2.7.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.7.1/) |
| v2.7.1-maintenance | SOL002 SOL003 SOL005 v2.7.1                                                      | [v2.7.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.7.1-fix-plu/)
| v2.8.1             | SOL002 SOL003 SOL005 v2.8.1                                                      | [v2.8.1](https://forge.etsi.org/rep/nfv/api-tests/tree/2.8.1/) |
| v2.8.1-maintenance | SOL002 SOL003 SOL005 v2.8.1                                                      | [v2.8.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/2.8.1-fix-plu/)|
| v3.3.1             | SOL002 SOL003 SOL005 v3.3.1<br>SOL009 SOL011 v3.3.1<br>SOL012 v3.4.1             | [v3.3.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.3.1/) |
| v3.3.1-maintenance | SOL002 SOL003 SOL005 v3.3.1<br>SOL009 SOL011 v3.3.1<br>SOL012 v3.4.1             | [v3.3.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.3.1-fix-plu/) |
| v3.5.1         | SOL002 SOL003 SOL005 v3.5.1<br>SOL009 v3.5.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1       | [v3.5.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.5.1/) |
| v3.5.1-maintenance | SOL002 SOL003 SOL005 v3.5.1<br>SOL009 v3.5.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1   | [v3.5.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.5.1-fix-plu/) |
| v3.6.1         | SOL002 SOL003 SOL005 v3.6.1<br>SOL009 v3.6.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1       | [v3.6.1](https://forge.etsi.org/rep/nfv/api-tests/tree/3.6.1/) |
| v3.6.1-maintenance | SOL002 SOL003 SOL005 v3.6.1<br>SOL009 v3.6.1<br>SOL011 v3.3.1<br>SOL012 v3.4.1   | [v3.6.1-fix-plu](https://forge.etsi.org/rep/nfv/api-tests/tree/3.6.1-fix-plu/) |
| v4.3.1         | SOL002 SOL003 SOL005 v4.3.1<br>SOL009               v4.3.1<br>SOL011               v3.3.1<br>SOL012               v3.4.1 | v4.3.1<br>(under development) |


+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@

This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs.

The reference spec version is v3.5.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.06.01_60/gs_NFV-SOL002v030601p.pdf
The reference spec version is v4.3.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/04.03.01_60/gs_NFV-SOL002v040301p.pdf
+10 −10
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ POST API Version - Method not implemented
    ...    Test title: POST API version - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -23,7 +23,7 @@ GET API Version
    ...    Test title: GET API Version
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -36,7 +36,7 @@ PUT API Version - Method not implemented
    ...    Test title: PUT API Version - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -48,7 +48,7 @@ PATCH API Version - Method not implemented
    ...    Test title: PATCH API Version - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -60,7 +60,7 @@ DELETE API Version - Method not implemented
    ...    Test title: DELETE API Version - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -72,7 +72,7 @@ POST API Version with apiMajorVerion - Method not implemented
    ...    Test title: POST API version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -84,7 +84,7 @@ GET API Version with apiMajorVerion
    ...    Test title: GET API Version with apiMajorVerion
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -97,7 +97,7 @@ PUT API Version with apiMajorVerion - Method not implemented
    ...    Test title: PUT API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -109,7 +109,7 @@ PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test title: PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -121,7 +121,7 @@ DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test title: DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v3.5.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v4.3.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
+74 −14
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verif
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem
Library    String
Library    DependencyLibrary

*** Test Cases ***
@@ -12,13 +13,13 @@ Set new VNF Configuration
    ...    Test title: Set a new VNF Configuration
    ...    Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
    ...    Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration
    Send VNF configuration
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains    ETag
    Check HTTP Response Header Contains ETag and Last-Modified
    Check HTTP Response Body Json Schema Is   vnfConfigModifications
    Check Postcondition VNF Is Configured

@@ -28,7 +29,7 @@ Get information about a VNF configuration
    ...    Test title: Get information about a VNF configuration
    ...    Test objective: The objective is to test the retrieval of an existing VNF instance configuration and perform a JSON schema validation of the collected configuration data structure
    ...    Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured.
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -42,13 +43,13 @@ Get information about a VNF configuration with HTTP Etag
    ...    Test title: Get information about a VNF configuration with HTTP Etag
    ...    Test objective: The objective is to test the retrieval of an existing VNF instance configuration, check the generation by the VNF of an HTTP Etag opaque identifier, and perform a JSON schema validation of the collected configuration data structure
    ...    Pre-conditions:  A VNF instance is instantiated. The VNF instance is already configured
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
    ...    Post-Conditions: none
    Get VNF configuration
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains    ETag
    Check HTTP Response Header Contains ETag and Last-Modified
    Check HTTP Response Body Json Schema Is   vnfConfiguration

Set new VNF Configuration - HTTP Etag precondition unsuccessful
@@ -57,7 +58,7 @@ Set new VNF Configuration - HTTP Etag precondition unsuccessful
    ...    Test title: Set a new VNF Configuration - HTTP Etag precondition unsuccessful
    ...    Test objective: The objective is to test the unsuccess in setting a duplication of VNF configuration identified by an already used HTTP Etag identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions:  A VNF instance is instantiated. The VNF instance is already configured (Test ID 6.3.1.1.1) with a given HTTP Etag identifier.
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
    ...    Post-Conditions:  The VNF configuration is not modified by the unsuccessful operation and it matches the configuration issued in Test ID 6.3.1.1.1
@@ -71,7 +72,7 @@ POST VNF Configuration - Method not implemented
    ...    Test title: POST VNF Configuration - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF configuration
    ...    Pre-conditions: none
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -83,7 +84,7 @@ PUT VNF Configuration - Method not implemented
    ...    Test title: PUT VNF Configuration - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify an existing VNF configuration
    ...    Pre-conditions:  none
    ...    Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -95,13 +96,44 @@ DELETE VNF Configuration - Method not implemented
    ...    Test title: Delete VNF Configuration - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF configuration
    ...    Pre-conditions:  none
    ...    Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v3.6.1
    ...    Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: none
    ...    Post-Conditions: none
    Send DELETE Request for VNF Configuration
    Check HTTP Response Status Code Is    405

Set new VNF Configuration With Attribute vnfConfigurationData
    [Documentation]    Test ID: 6.3.1.1.8
    ...    Test title: Set a new VNF Configuration with Attribute vnfConfigurationData
    ...    Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
    ...    Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration
    Send VNF configuration with vnfConfigurationData
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains ETag and Last-Modified
    Check HTTP Response Body Json Schema Is   vnfConfigModifications
    Check Postcondition VNF Is Configured
    
Set new VNF Configuration With Attribute vnfcConfigurationData
    [Documentation]    Test ID: 6.3.1.1.9
    ...    Test title: Set a new VNF Configuration with Attribute vnfcConfigurationData
    ...    Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v4.3.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation of HTTP Etag opaque identifiers
    ...    Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration
    Send VNF configuration with vnfcConfigurationData
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains ETag and Last-Modified
    Check HTTP Response Body Json Schema Is   vnfConfigModifications
    Check Postcondition VNF Is Configured


*** Keywords ***    
Get VNF configuration
    Log    Query VNF The GET method queries information about a configuration.
@@ -128,11 +160,12 @@ Check HTTP Response Status Code Is
    Should Be Equal As Strings    ${response['status']}    ${expected_status}
    Log    Status code validated

Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
Check HTTP Response Header Contains ETag and Last-Modified
    Pass Execution If    ${HEADER_TEST_SUPPORTED} == 0    Headers testing not supported. Skipping the Test.
    Log    ${response['headers']}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Log    Header is present
    Should Contain    ${response['headers']}    Etag
    Should Contain    ${response['headers']}    Last-Modified
    Log    Etag and Last-Modified Headers are present
    
Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
@@ -188,3 +221,30 @@ Send DELETE Request for VNF Configuration
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/configuration
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Send VNF configuration with vnfConfigurationData
    log    Trying to perform a PATCH. This method modifies the configuration when attribute is vnfConfigurationData   
    Set Headers  {"Accept":"${ACCEPT}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File   jsons/vnfConfigModificationsWithVnfConfigurationData.json
    ${body}=        Format String   ${template}    cpId=${cpId}    cpdId=${cpdId}   
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/configuration    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
  
Send VNF configuration with vnfcConfigurationData
    log    Trying to perform a PATCH. This method modifies the configuration when attribute is vnfcConfigurationData  
    Set Headers  {"Accept":"${ACCEPT}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File   jsons/vnfConfigModificationsWithvnfcConfigurationData.json
    ${body}=        Format String   ${template}    vnfcInstanceId=${vnfcInstanceId}    cpId=${cpId}    cpdId=${cpdId}  
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/configuration    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
Check HTTP Response Header Contains
    [Arguments]    ${CONTENT_TYPE}
    Log    ${response['headers']}
    Should Contain    ${response['headers']}    ${CONTENT_TYPE}
    Log    Header is present
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -13,8 +13,14 @@ ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

${CONTENT_TYPE}    application/json

${HEADER_TEST_SUPPORTED}    0

${apiRoot}        /
${apiName}        vnfconfig
${apiMajorVersion}     v1

${etag}    enter-etag-value-for-testing-mismatch-condition

${cpId}  
${cpdId}
${vnfcInstanceId}
Loading