SOL005 NS Performance management - Implementation of deltas between v4.5.1 and v4.4.1

This merge request refers to the implementation of deltas between v4.5.1 and v4.4.1 of SOL005 NS Performance Management Interface.

Deadline for review: Wed 25th Sept 2024 @noon CEST

Merge request reports

Loading
+6 −0
Changes for SOL005/NSPerformanceManagement-API/environment/variables.txt: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,12 @@ ${NFVO_PORT} 8081 # Listening port of the NFVO
${NFVO_SCHEMA}    https
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

${OAUTH_ENCRIPTION_ALGORITHM}    HS256
${JOBS_PERMITTED_SCOPE}    nspm:v2:pm_jobs 
${THRESHOLDS_PERMITTED_SCOPE}    nspm:v2:thresholds 
${NOT_PERMITTED_SCOPE}    nspm:v2:invalid

${CONTENT_TYPE_JSON}    application/json
${ACCEPT_JSON}    application/json
${apiRoot}        /
+36 −10
Changes for SOL005/NSPerformanceManagement-API/IndividualPmJob.robot: 36 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ GET individual NS Performance Job
    ...    Test title: Get individual NS Performance Job
    ...    Test objective: The objective is to test the retrieval of an individual NS Performance monitoring job and perform a JSON schema and content validation of the collected job data structure
    ...    Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -30,7 +30,7 @@ GET individual NS Performance Job with invalid resource identifier
    ...    Test title: Get individual NS Performance Job with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of an individual NS 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 NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -43,7 +43,7 @@ DELETE Individual NS Performance Job with invalid resource identifier
    ...    Test title: Delete individual NS Performance Job with invalid resource identifier
    ...    Test objective: The objective is to test that the deletion of an individual NS Performance monitoring job fails when using an invalid resource identifier
    ...    Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -55,7 +55,7 @@ POST Individual NS Performance Job - Method not implemented
    ...    Test title: POST Individual NS Performance Job - method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new NS Performance Monitoring Job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -67,7 +67,7 @@ PUT Individual NS Performance Job - Method not implemented
    ...    Test title: PUT Individual NS Performance Job - method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing NS Performance Monitoring Job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -79,7 +79,7 @@ PATCH Individual NS Performance Job
    ...    Test title: PATCH Individual NS Performance Job 
    ...    Test objective: The objective is to test that PATCH method modify an existing new NS Performance Monitoring Job
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO.
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: Resource modified
@@ -92,7 +92,7 @@ DELETE Individual NS Performance Job
    ...    Test title: Delete Individual NS Performance Job
    ...    Test objective: The objective is to test the deletion of an individual NS Performance monitoring job
    ...    Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The NS Performance Job is no more available in the NFVO    
@@ -105,7 +105,7 @@ PATCH Individual NS Performance Job - Precondition failed
    ...    Test title: PATCH Individual NS Performance Job - Precondition failed
    ...    Test objective: The objective is to attempt to Modify an individual NS Performance job fails, where the precondition was not met
    ...    Pre-conditions: The related job already exist
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The resource is not modified
@@ -118,7 +118,7 @@ PATCH Individual NS Performance Job - Precondition failed HTTP Conditional Reque
    ...    Test title: PATCH Individual NS Performance Job - Precondition failed HTTP Conditional Request Not Supported
    ...    Test objective: The objective is to attempt to Modify an individual NS Performance job fails, where the API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: The related job already exist
    ...    Reference: Clause 7.4.3.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Post-Conditions: The resource is not modified
@@ -131,10 +131,36 @@ PATCH Individual NS Performance Job - Unprocessable Content
    ...    Test title: PATCH Individual NS Performance Job - Unprocessable Content
    ...    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 NS instance is instantiated. One or more NS performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Patch request for individual NS Performance Job with unprocessable content
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET individual NS Performance Job with permitted authorization scope
    [Documentation]    Test ID: 5.3.4.2.10
    ...    Test title: Get individual NS Performance Job with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of an individual NS Performance monitoring job with permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual NS Performance Job with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmJob
    Check HTTP Response Body Pm Job Identifier matches the requested Pm Job

GET individual NS Performance Job with not permitted authorization scope
    [Documentation]    Test ID: 5.3.4.2.11
    ...    Test title: Get individual NS Performance Job with not permitted authorization scope
    ...    Test objective: The objective is to test that the retrieval of an individual NS Performance monitoring job fails when using not permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual NS Performance Job with not permitted authorization scope
    Check HTTP Response Status Code Is    401
 No newline at end of file
+30 −6
Changes for SOL005/NSPerformanceManagement-API/IndividualReport.robot: 30 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ Get Individual Performance Report
    ...    Test title: Get Individual Performance Report
    ...    Test objective: The objective is to test the retrieval of an individual NS performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO.
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: 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 objective:  The objective is to test that the retrieval of an individual NS performance report associated to a monitoring job fails when using an invalid resource endpoint 
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO.
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: 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 objective: The objective is to test that POST method is not allowed to create a new NS performance report within a monitoring job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: 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 objective: The objective is to test that PUT method is not allowed to update an existing NS performance report within a monitoring job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: 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 objective: The objective is to test that PATCH method is not allowed to modify an existing NS performance report within a monitoring job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -73,10 +73,34 @@ 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 NS performance report within a monitoring job
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send Delete request for Individual Performance Report
    Check HTTP Response Status Code Is    405

Get Individual Performance Report with permitted authorization scope
    [Documentation]    Test ID: 5.3.4.3.7
    ...    Test title: Get Individual Performance Report with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of an individual NS performance report associated to a monitoring job with permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO.
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Individual Performance Report with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PerformanceReport

Get Individual Performance Report with not permitted authorization scope
    [Documentation]    Test ID: 5.3.4.3.8
    ...    Test title: Get Individual Performance Report with not permitted authorization scope
    ...    Test objective: The objective is to test that the retrieval of an individual NS performance report associated to a monitoring job fails when using permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO.
    ...    Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Individual Performance Report with not permitted authorization scope
    Check HTTP Response Status Code Is    401
+36 −10
Changes for SOL005/NSPerformanceManagement-API/IndividualThreshold.robot: 36 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ GET Individual Threshold
    ...    Test title: GET Individual Threshold
    ...    Test objective: The objective is to test the retrieval of an individual NS performance threshold and perform a JSON schema and content validation of the collected threshold data structure
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -32,7 +32,7 @@ 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 NS performance threshold fails when using an invalid resource identifier
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -45,7 +45,7 @@ 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 NS performance threshold
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none   
@@ -57,7 +57,7 @@ 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 NS performance Threshold
    ...    Pre-conditions: A NS instance is instantiated
    ...    Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -69,7 +69,7 @@ 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 NS performance threshold
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
@@ -81,7 +81,7 @@ PATCH Individual Threshold
    ...    Test title: PATCH Individual Threshold 
    ...    Test objective: The objective is to test that PATCH method modify an existing NS performance threshold
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The NS performance Threshold is modified by the operation
@@ -95,7 +95,7 @@ DELETE Individual Threshold
    ...    Test title: DELETE Individual Threshold
    ...    Test objective: The objective is to test the deletion of an individual NS performance threshold
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The NS performance Threshold is not available anymore in the NFVO    
@@ -108,7 +108,7 @@ PATCH Individual Threshold - Precondition failed
    ...    Test title: PATCH Individual Threshold - Precondition failed 
    ...    Test objective: The objective is to attempt to Modify an individual NS Performance threshold fails, where the precondition was not met
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The NS performance Threshold is not modified by the operation
@@ -122,7 +122,7 @@ PATCH Individual Threshold - Precondition failed HTTP Conditional Request Not Su
    ...    Test title: PATCH Individual Threshold - Precondition failed HTTP Conditional Request Not Supported
    ...    Test objective: The objective is to attempt to Modify an individual NS Performance threshold fails, where the API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.4, 4.5 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: API Producer does not support "Last-Modified" and "ETag" HTTP Headers
    ...    Post-Conditions: The NS performance Threshold is not modified by the operation
@@ -136,7 +136,7 @@ PATCH Individual Threshold - Unprocessable Content
    ...    Test title: PATCH Individual NS Performance Job - Unprocessable Content
    ...    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 NS instance is instantiated. One or more NS performance jobs are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.4.1
    ...    Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The NS performance Threshold is not modified by the operation
@@ -144,3 +144,29 @@ PATCH Individual Threshold - Unprocessable Content
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Check Postcondition NS performance Threshold is Unmodified (Implicit)

GET Individual Threshold with permitted authorization scope
    [Documentation]    Test ID: 5.3.4.5.10
    ...    Test title: GET Individual Threshold with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of an individual NS performance threshold with permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual NS performance Threshold with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   Threshold
    Check HTTP Response Body Threshold Identifier matches the requested Threshold  

GET Individual Threshold with not permitted authorization scope
    [Documentation]    Test ID: 5.3.4.5.11
    ...    Test title: GET Individual Threshold with not permitted authorization scope
    ...    Test objective: The objective is to test that the retrieval of an individual NS performance threshold fails when using not permitted authorization scope
    ...    Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO.
    ...    Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v4.5.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET individual NS performance Threshold with not permitted authorization scope
    Check HTTP Response Status Code Is    401    
+117 −0
Changes for SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot: 117 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Library Collections
Library    JSONSchemaLibrary    schemas/
Library    Process
Library    String
Library    jwt

*** Keywords ***
GET all NS Performance Monitoring Jobs
@@ -19,6 +20,28 @@ GET all NS Performance Monitoring Jobs
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET all NS Performance Monitoring Jobs with permitted authorization scope
    Log    Trying to get all PM Jobs present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${JOBS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET all NS Performance Monitoring Jobs with not permitted authorization scope
    Log    Trying to get all PM Jobs present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET NS Performance Monitoring Jobs with attribute-based filter
    Log    Trying to get all PM Jobs present in the NFVO, using filter params
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -211,6 +234,28 @@ GET individual NS Performance Job
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET individual NS Performance Job with permitted authorization scope
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${JOBS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET individual NS Performance Job with not permitted authorization scope
    Log    Trying to get a Pm Job present in the NFVO Catalogue
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET individual NS Performance Job with invalid resource identifier  
    Log    Trying to perform a negative get, using erroneous PM Job identifier
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -352,6 +397,28 @@ Check HTTP Response Body Pm Job Identifier matches the requested Pm Job
    Log    Pm Job identifier as expected

Get Individual Performance Report
    Log    Trying to get a performance report present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${JOBS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Get Individual Performance Report with permitted authorization scope
    Log    Trying to get a performance report present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 

Get Individual Performance Report with not permitted authorization scope
    Log    Trying to get a performance report present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
@@ -409,6 +476,29 @@ GET all Performance Thresholds
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET all Performance Thresholds with permitted authorization scope
    Log    Trying to get all thresholds present in the NFVO    
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${THRESHOLDS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

 
GET all Performance Thresholds with not permitted authorization scope
    Log    Trying to get all thresholds present in the NFVO    
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}   

GET Performance Thresholds with attribute-based filter
    Log    Trying to get thresholds present in the NFVO with filter
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -520,6 +610,28 @@ GET Individual NS performance Threshold
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET Individual NS performance Threshold with permitted authorization scope
    Log    Trying to get a Threhsold present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${THRESHOLDS_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

GET Individual NS performance Threshold with not permitted authorization scope
    Log    Trying to get a Threhsold present in the NFVO
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    ${scopeValue}=    Create Dictionary    scope=${NOT_PERMITTED_SCOPE} 
    ${authorizationToken}=    JWT Encode    payload=${scopeValue}    key=''    algorithm=${OAUTH_ENCRIPTION_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    Log    Authorization Token: ${authorizationToken}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}   

GET individual NS performance Threshold with invalid resource identifier
    Log    Trying to get a Threhsold with invalid resource endpoint
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -687,3 +799,8 @@ Check Notification Endpoint
Check HTTP Response Header Contains Location
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}

JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded} 
Loading
Loading