Commit 060a29ce authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '2.7.1-dev-SOL003-VNFPerformanceManagement-API' into '2.7.1-dev'

SOL003 VNF Performance Management - Implementation of deltas between v2.7.1 and v2.6.1

See merge request !124
parents bb406382 ec4cdcda
Loading
Loading
Loading
Loading
+213 −213
Original line number Diff line number Diff line
@@ -13,7 +13,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -25,7 +25,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -38,7 +38,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -50,7 +50,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -62,7 +62,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -74,7 +74,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
@@ -86,7 +86,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -99,7 +99,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -111,7 +111,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -123,7 +123,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 v2.6.1
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -134,70 +134,70 @@ DELETE API Version with apiMajorVerion - Method not implemented
POST API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/api_version
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/api_version
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/api_version
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/api_version
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/api_version
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Post    ${apiRoot}/${apiName}/v1/api_version
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Get    ${apiRoot}/${apiName}/v1/api_version
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Put    ${apiRoot}/${apiName}/v1/api_version
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Patch    ${apiRoot}/${apiName}/v1/api_version
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    Delete    ${apiRoot}/${apiName}/v1/api_version
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
+44 −30
Original line number Diff line number Diff line
*** Settings ***
Library           OperatingSystem
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Library           JSONLibrary
Resource          environment/IndividualPmJob.txt
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false

*** Test Cases ***
@@ -11,7 +11,7 @@ GET individual VNF Performance Job
    ...    Test title: Get individual VNF Performance Job
    ...    Test objective: The objective is to test the retrieval of an individual VNF performance monitoring job and perform a JSON schema and content validation of the collected job data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -25,7 +25,7 @@ GET individual VNF Performance Job with invalid resource identifier
    ...    Test title: Get individual VNF Performance Job with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -38,7 +38,7 @@ DELETE Individual VNF Performance Job
    ...    Test title: Delete Individual VNF Performance Job
    ...    Test objective: The objective is to test the deletion of an individual VNF performance monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is no more available in the VNFM    
@@ -51,58 +51,70 @@ DELETE Individual VNF Performance Job with invalid resource identifier
    ...    Test title: Delete individual VNF Performance Job with invalid resource identifier
    ...    Test objective: The objective is to test that the deletion of an individual VNF performance monitoring job fails when using an invalid resource identifier
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Delete request for individual VNF Performance Job with invalid resource identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails

POST Individual VNF Performance Job - Method not implemented
    [Documentation]    Test ID: 7.3.4.2.5
    ...    Test title: POST Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is not created on the VNFM
    ...    Post-Conditions: none
    Send Post request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Job is not Created

PUT Individual VNF Performance Job - Method not implemented
    [Documentation]    Test ID: 7.3.4.2.6
    ...    Test title: PUT Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Performance Job is Unmodified (Implicit)

PATCH Individual VNF Performance Job - Method not implemented
PATCH Individual VNF Performance Job
    [Documentation]    Test ID: 7.3.4.2.7
    ...    Test title: PATCH Individual VNF Performance Job - method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing new VNF Performance Monitoring Job
    ...    Test title: PATCH Individual VNF Performance Job
    ...    Test objective: The objective is to test that PATCH method allows to modify individual performace management job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: 
    Send Patch request for individual VNF Performance Job
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PMJobModifications
    
PATCH Individual VNF Performance Job - Precondition failed
    [Documentation]    Test ID: 7.3.4.2.8
    ...    Test title: PATCH Individual VNF Performance Job - Precondition failed
    ...    Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met.
    ...    Pre-conditions:  A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  The VNF Performance Job is not modified by the operation
    Send Patch request for individual VNF Performance Job
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is   ProblemDetails
    Check Postcondition VNF Performance Job is Unmodified (Implicit)    
    
*** Keywords ***
GET individual VNF Performance Job
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

@@ -110,7 +122,7 @@ GET individual VNF Performance Job with invalid resource identifier
    Log    Trying to perform a negative get, using erroneous PM Job identifier
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

@@ -118,7 +130,7 @@ Send Delete request for individual VNF Performance Job
    Log    Trying to delete an existing PM Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -126,7 +138,7 @@ Send Delete request for individual VNF Performance Job with invalid resource ide
    Log    Trying to perform a negative delete, using erroneous PM Job identifier
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    DELETE    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

@@ -134,7 +146,7 @@ Send Post request for individual VNF Performance Job
    Log    Trying to perform a POST (method should not be implemented)
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    POST    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
@@ -142,18 +154,20 @@ Send Put request for individual VNF Performance Job
    Log    Trying to perform a POST (method should not be implemented)
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${origOutput}=    Output    response
    Set Suite Variable    ${origResponse}    ${origOutput}
    PUT    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Send Patch request for individual VNF Performance Job    
    Log    Trying to perform a PATCH (method should not be implemented)
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    PATCH    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}
    ${body}=    Get File    jsons/PMJobModifications.json
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}

    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

@@ -161,7 +175,7 @@ Check Postcondition VNF Performance Job is not Created
    Log    Trying to get a new Pm Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404
+25 −49

File changed.

Preview size limit exceeded, changes collapsed.

+0 −100

File deleted.

Preview size limit exceeded, changes collapsed.

+48 −46

File changed.

Preview size limit exceeded, changes collapsed.

Loading