Commit ac332c61 authored by Mudassar Khan's avatar Mudassar Khan Committed by Giacomo Bernini
Browse files

implement OAuth scope test for VNFPerformanceManagement API of SOL002

parent 5a5330e0
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
*** Settings ***
Library     JSONSchemaLibrary    schemas/
Resource    environment/variables.txt    # Generic Parameters
Resource    VNFPerformanceManagementKeywords.robot
Library     JSONLibrary
Library     REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library     OperatingSystem
@@ -126,6 +127,30 @@ PATCH Individual VNF Performance Job - UNPROCESSABLE CONTENT
    Send Patch request for individual VNF Performance Job with Unreachable Callback URI
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails
DELETE Individual VNF Performance Job with permitted authorization scope
    [Documentation]    Test ID: 6.3.3.2.10
    ...    Test title: Delete Individual VNF Performance Job with permitted authorization scope
    ...    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 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is no more available in the VNFM    
    Send Delete request for individual VNF Performance Job with permitted authorization scope
    Check HTTP Response Status Code Is    204
    Check Postcondition VNF Pm Job is Deleted
DELETE Individual VNF Performance Job with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.3.2.11
    ...    Test title: Delete Individual VNF Performance Job with NOT permitted authorization scope
    ...    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 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Job is no more available in the VNFM    
    Send Delete request for individual VNF Performance Job with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

*** Keywords ***
GET individual VNF Performance Job
+25 −0
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          VNFPerformanceManagementKeywords.robot
Library           JSONLibrary
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false

@@ -78,6 +79,30 @@ DELETE Individual Performance Report - Method not implemented
    ...    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: 6.3.3.3.7
    ...    Test title: Get Individual Performance Report with permitted authorization scope
    ...    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.
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    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: 6.3.3.3.8
    ...    Test title: Get Individual Performance Report with NOT permitted authorization scope
    ...    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.
    ...    Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get Individual Performance Report with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

*** Keywords ***
Get Individual Performance Report
+27 −0
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          VNFPerformanceManagementKeywords.robot
Library           JSONLibrary
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library           OperatingSystem
@@ -126,6 +127,32 @@ PATCH Individual Threshold - UNPROCESSABLE CONTENT
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails
    Check Postcondition VNF Performance Threshold is Unmodified (Implicit)
GET Individual Threshold with permitted authorization scope
    [Documentation]    Test ID: 6.3.3.5.10
    ...    Test title: GET Individual Threshold with permitted authorization scope
    ...    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.
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Performance Threshold with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contains ETag and Last-Modified
    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: 6.3.3.5.11
    ...    Test title: GET Individual Threshold with NOT permitted authorization scope
    ...    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.
    ...    Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Individual VNF Performance Threshold with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

*** Keywords ***
GET Individual VNF Performance Threshold
+26 −1
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource          VNFPerformanceManagementKeywords.robot
Library           JSONLibrary
Library           OperatingSystem
Library           String
@@ -217,6 +218,30 @@ POST Create new VNF Performance Monitoring Job - UNPROCESSABLE CONTENT
    Send Post Request Create new VNF Performance Monitoring Job with Unreachable Callback URI
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is   ProblemDetails
GET all VNF Performance Monitoring Jobs with permitted authorization scope
    [Documentation]    Test ID: 6.3.3.1.17
    ...    Test title: GET all VNF Performance Monitoring Jobs with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET all VNF Performance Monitoring Jobs with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmJobs
GET all VNF Performance Monitoring Jobs with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.3.1.18
    ...    Test title: GET all VNF Performance Monitoring Jobs with not permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF.
    ...    Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    GET all VNF Performance Monitoring Jobs with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

*** Keywords ***
GET all VNF Performance Monitoring Jobs
+27 −0
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Resource    VNFPerformanceManagementKeywords.robot
Library           JSONLibrary
Library           String
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
@@ -149,6 +150,32 @@ POST Create new Performance Threshold - UNPROCESSABLE CONTENT
    Send Post Request Create new Performance Threshold with Unreachable Callback URI
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails
POST Create new Performance Threshold with permitted authorization scope
    [Documentation]    Test ID: 6.3.3.4.12
    ...    Test title:  POST Create new Performance Threshold with permitted authorization scope
    ...    Test objective: The objective is to test that the POST method creates a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM
    Send Post Request Create new Performance Threshold with permitted authorization scope
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   Threshold
    Check HTTP Response Header Contains    Location
    Check Postcondition Threshold Exists
POST Create new Performance Threshold with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.3.4.13
    ...    Test title:  POST Create new Performance Threshold with permitted authorization scope
    ...    Test objective: The objective is to test that the POST method creates a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM
    Send Post Request Create new Performance Threshold with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

    
*** Keywords ***
Loading