Commit c4470c52 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '3.5.1-dev-SOL003-VNF-PM' into '3.5.1-dev'

SOL003 VNF Performance Management - Implementation of deltas between v3.5.1 and v3.3.1

See merge request !213
parents a3cf6f26 526902b5
Loading
Loading
Loading
Loading
+29 −12
Original line number Original line Diff line number Diff line
@@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters
Library           JSONLibrary
Library           JSONLibrary
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           String
Library           String
Library           MockServerLibrary
Library           Process

Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true


*** Test Cases ***
*** Test Cases ***
GET individual VNF Performance Job
GET individual VNF Performance Job
@@ -12,7 +17,7 @@ GET individual VNF Performance Job
    ...    Test title: 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
    ...    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.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -26,7 +31,7 @@ GET individual VNF Performance Job with invalid resource identifier
    ...    Test title: 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
    ...    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.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -39,7 +44,7 @@ DELETE Individual VNF Performance Job
    ...    Test title: 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
    ...    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.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is no more available in the VNFM    
    ...    Post-Conditions: The VNF Performance Job is no more available in the VNFM    
@@ -52,7 +57,7 @@ DELETE Individual VNF Performance Job with invalid resource identifier
    ...    Test title: 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
    ...    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.
    ...    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.7.1
    ...    Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -65,7 +70,7 @@ POST Individual VNF Performance Job - Method not implemented
    ...    Test title: POST Individual VNF Performance Job - method not implemented
    ...    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
    ...    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
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -77,7 +82,7 @@ PUT Individual VNF Performance Job - Method not implemented
    ...    Test title: PUT Individual VNF Performance Job - method not implemented
    ...    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
    ...    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.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -89,7 +94,7 @@ PATCH Individual VNF Performance Job
    ...    Test title: PATCH Individual VNF Performance 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
    ...    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.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: 
    ...    Post-Conditions: 
@@ -102,7 +107,7 @@ PATCH Individual VNF Performance Job - Precondition failed
    ...    Test title: PATCH Individual VNF Performance Job - Precondition failed
    ...    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.
    ...    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.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions:  The VNF Performance Job is not modified by the operation
    ...    Post-Conditions:  The VNF Performance Job is not modified by the operation
@@ -116,7 +121,7 @@ PATCH Individual VNF Performance Job - Unprocessable Entity
    ...    Test title: PATCH Individual VNF Performance Job - Unprocessable Entity
    ...    Test title: PATCH Individual VNF Performance Job - Unprocessable Entity
    ...    Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when a request contains syntactically correct data but the data cannot be processed.
    ...    Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when a request contains syntactically correct data but the data cannot be processed.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    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] v3.3.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -126,6 +131,11 @@ PATCH Individual VNF Performance Job - Unprocessable Entity
    
    
    
    
*** Keywords ***
*** Keywords ***
Create Sessions
    Start Process  java  -jar  ${MOCK_SERVER_JAR}    -serverPort  ${callback_port}  alias=mockInstance
    Wait For Process  handle=mockInstance  timeout=5s  on_timeout=continue
    Create Mock Session  ${callback_uri}:${callback_port}
    
GET individual VNF Performance Job
GET individual VNF Performance Job
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -182,10 +192,17 @@ Send Patch request for individual VNF Performance Job
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/PMJobModifications.json
    ${template}=    Get File    jsons/PMJobModifications.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_uri=${callback_endpoint} 
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_endpoint=${callback_endpoint} 
    Log  Creating mock request and response to handle GET operation on notification endpoint
    &{notification_request}=  Create Mock Request Matcher	GET  ${callback_endpoint}
    &{notification_response}=  Create Mock Response	status_code=204
    Log    Issue the request
    Create Mock Expectation  ${notification_request}  ${notification_response}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    Verify Mock Expectation    ${notification_request}
	Clear Requests    ${callback_endpoint}


Send Patch request for individual VNF Performance Job - Etag mismatch  
Send Patch request for individual VNF Performance Job - Etag mismatch  
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
@@ -193,7 +210,7 @@ Send Patch request for individual VNF Performance Job - Etag mismatch
    Set Headers  {"If-Match": "${invalid_etag}"} 
    Set Headers  {"If-Match": "${invalid_etag}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/PMJobModifications.json
    ${template}=    Get File    jsons/PMJobModifications.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_uri=${callback_endpoint} 
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_endpoint=${callback_endpoint} 
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
@@ -204,7 +221,7 @@ Send Patch request for individual VNF Performance Job with unprocessable entity
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/PMJobModifications.json
    ${template}=    Get File    jsons/PMJobModifications.json
    ${body}=        Format String   ${template}    callback_uri=${unreachable_callback_uri}:${callback_port}
    ${body}=        Format String   ${template}    callback_uri=${unreachable_callback_uri}    callback_port=${callback_port}    callback_endpoint=${callback_endpoint} 
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}     ${body}
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
+6 −6
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ Get Individual Performance Report
    ...    Test title: Get Individual Performance Report
    ...    Test title: Get Individual Performance Report
    ...    Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure
    ...    Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -24,7 +24,7 @@ Get Individual Performance Report with invalid resource endpoint
    ...    Test title: Get Individual Performance Report with invalid resource endpoint
    ...    Test title: Get Individual Performance Report with invalid resource endpoint
    ...    Test objective:  The objective is to test that the retrieval of an individual VNF performance report associated to a monitoring job fails when using an invalid resource endpoint 
    ...    Test objective:  The objective is to test that the retrieval of an individual VNF performance report associated to a monitoring job fails when using an invalid resource endpoint 
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -37,7 +37,7 @@ POST Individual Performance Report - Method not implemented
    ...    Test title: POST Individual Performance Report - Method not implemented
    ...    Test title: POST Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -49,7 +49,7 @@ PUT Individual Performance Report - Method not implemented
    ...    Test title: PUT Individual Performance Report - Method not implemented
    ...    Test title: PUT Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -61,7 +61,7 @@ PATCH Individual Performance Report - Method not implemented
    ...    Test title: PATCH Individual Performance Report - Method not implemented
    ...    Test title: PATCH Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -73,7 +73,7 @@ DELETE Individual Performance Report - Method not implemented
    ...    Test title: DELETE Individual Performance Report - Method not implemented
    ...    Test title: DELETE Individual Performance Report - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM.
    ...    Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
+27 −11
Original line number Original line Diff line number Diff line
@@ -5,6 +5,11 @@ Library JSONLibrary
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           OperatingSystem
Library           OperatingSystem
Library           String
Library           String
Library           Process
Library           MockServerLibrary

Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true


*** Test Cases ***
*** Test Cases ***
GET Individual Threshold
GET Individual Threshold
@@ -12,7 +17,7 @@ GET Individual Threshold
    ...    Test title: GET Individual Threshold
    ...    Test title: GET Individual Threshold
    ...    Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure
    ...    Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -26,7 +31,7 @@ GET Individual Threshold with invalid resource identifier
    ...    Test title: GET Individual Threshold with invalid resource identifier
    ...    Test title: GET Individual Threshold with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual VNF performance threshold fails when using an invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual VNF performance threshold 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.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -39,7 +44,7 @@ DELETE Individual Threshold
    ...    Test title: DELETE Individual Threshold
    ...    Test title: DELETE Individual Threshold
    ...    Test objective: The objective is to test the deletion of an individual VNF performance threshold
    ...    Test objective: The objective is to test the deletion of an individual VNF performance threshold
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM    
    ...    Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM    
@@ -52,7 +57,7 @@ DELETE Individual Threshold with invalid resource identifier
    ...    Test title: DELETE Individual Threshold with invalid resource identifier
    ...    Test title: DELETE Individual Threshold with invalid resource identifier
    ...    Test objective: The objective is to test the deletion of an individual VNF performance threshold
    ...    Test objective: The objective is to test the deletion of an individual VNF performance threshold
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none   
    ...    Post-Conditions: none   
@@ -65,7 +70,7 @@ POST Individual Threshold - Method not implemented
    ...    Test title: POST Individual Threshold - Method not implemented
    ...    Test title: POST Individual Threshold - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold
    ...    Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Pre-conditions: A VNF instance is instantiated
    ...    Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -77,7 +82,7 @@ PUT Individual Threshold - Method not implemented
    ...    Test title: PUT Individual Threshold - Method not implemented
    ...    Test title: PUT Individual Threshold - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -89,7 +94,7 @@ PATCH Individual Threshold
    ...    Test title: PATCH Individual Threshold
    ...    Test title: PATCH Individual Threshold
    ...    Test objective: The objective is to test that PATCH method allows to modify an Individual threshold resource.
    ...    Test objective: The objective is to test that PATCH method allows to modify an Individual threshold resource.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: 
    ...    Post-Conditions: 
@@ -102,7 +107,7 @@ PATCH Individual Threshold - Precondition failed
    ...    Test title: PATCH Individual Threshold - Preconition failed
    ...    Test title: PATCH Individual Threshold - Preconition failed
    ...    Test objective: The objective is to attempt to modify an individual threshold resource, where the precondition was not met.
    ...    Test objective: The objective is to attempt to modify an individual threshold 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.
    ...    Pre-conditions:  A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions:  none
    ...    Post-Conditions:  none
@@ -115,7 +120,7 @@ PATCH Individual Threshold - Unprocessible Entity
    ...    Test title: PATCH Individual Threshold - Unprocessible Entity 
    ...    Test title: PATCH Individual Threshold - Unprocessible Entity 
    ...    Test objective: The objective is to test that PATCH method cannot modify an individual threshold resource when a request contains syntactically correct data but the data cannot be processed.
    ...    Test objective: The objective is to test that PATCH method cannot modify an individual threshold resource when a request contains syntactically correct data but the data cannot be processed.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM.
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
@@ -125,6 +130,11 @@ PATCH Individual Threshold - Unprocessible Entity




*** Keywords ***
*** Keywords ***
Create Sessions
    Start Process  java  -jar  ${MOCK_SERVER_JAR}    -serverPort  ${callback_port}  alias=mockInstance
    Wait For Process  handle=mockInstance  timeout=5s  on_timeout=continue
    Create Mock Session  ${callback_uri}:${callback_port}

GET Individual VNF Performance Threshold
GET Individual VNF Performance Threshold
    Log    Trying to get a Threhsold present in the VNFM
    Log    Trying to get a Threhsold present in the VNFM
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -180,9 +190,16 @@ Send Patch request for individual VNF Performance Threshold
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/ThresholdModifications.json
    ${template}=    Get File    jsons/ThresholdModifications.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_uri=${callback_endpoint}   
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_port=${callback_port}    callback_uri=${callback_endpoint}   
    Log  Creating mock request and response to handle GET operation on notification endpoint
    &{notification_request}=  Create Mock Request Matcher	GET  ${callback_endpoint}
    &{notification_response}=  Create Mock Response	status_code=204
    Log    Issue the request
    Create Mock Expectation  ${notification_request}  ${notification_response}    
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    Verify Mock Expectation    ${notification_request}
	Clear Requests    ${callback_endpoint}


Send Patch request for individual VNF Performance Threshold - Etag mismatch
Send Patch request for individual VNF Performance Threshold - Etag mismatch
    Log    Trying to PUT threshold
    Log    Trying to PUT threshold
@@ -196,14 +213,13 @@ Send Patch request for individual VNF Performance Threshold - Etag mismatch
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
    
    
    
Send Patch request for individual VNF Performance Threshold with unprocessable entity
Send Patch request for individual VNF Performance Threshold with unprocessable entity
    Log    Trying to PATCH threshold
    Log    Trying to PATCH threshold
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Accept":"${ACCEPT_JSON}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"} 
    Set Headers  {"Content-Type": "${CONTENT_TYPE_PATCH}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template}=    Get File    jsons/ThresholdModifications.json
    ${template}=    Get File    jsons/ThresholdModifications.json
    ${body}=        Format String   ${template}    callback_uri=${unreachable_callback_uri}:${callback_port}
    ${body}=        Format String   ${template}    callback_uri=${callback_uri}    callback_port=${callback_port}    callback_uri=${callback_endpoint}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}     ${body}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}     ${body}
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}
+2 −2
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@ Performance Information Available Notification
    ...    Test title: Performance Information Available Notification
    ...    Test title: Performance Information Available Notification
    ...    Test objective: The objective is to test that the POST request triggers Performance Information Available Notification.
    ...    Test objective: The objective is to test that the POST request triggers Performance Information Available Notification.
    ...    Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM.
    ...    Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM.
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
@@ -25,7 +25,7 @@ Threshold Crossed Notification
    ...    Test title: Threshold Crossed Notification
    ...    Test title: Threshold Crossed Notification
    ...    Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification
    ...    Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification
    ...    Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM.
    ...    Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM.
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
+2 −2
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@ VNF Performance Information Availability Notification
    ...    Test title: VNF Performance Information Availability Notification
    ...    Test title: VNF Performance Information Availability Notification
    ...    Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
    ...    Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
    ...    Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM.
    ...    Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM.
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
@@ -29,7 +29,7 @@ VNF Threshold Crossed Notification
    ...    Test title: VNF Threshold Crossed Notification
    ...    Test title: VNF Threshold Crossed Notification
    ...    Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
    ...    Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system.
    ...    Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM.
    ...    Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM.
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1
    ...    Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none 
    ...    Post-Conditions: none 
Loading