SOL002 VNF Indicator - 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 SOL002 VNF Indicator Interface.

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

Merge request reports

Loading
+7 −0
Changes for SOL002/VNFIndicator-API/environment/variables.txt: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -44,6 +44,13 @@ ${NEG_FILTER} callback=http://127.0.0.1/subscribe
${total_polling_time}   2 min
${polling_interval}     10 sec
${SEPERATOR}      =
${INDICATORS_VNF_SCOPE}=    vnfind_by_vnf:v1:indicators
${SUBSCRIPTIONS_VNF_SCOPE}=     vnfind_by_vnf:v1:subscriptions
${INDICATORS_EM_SCOPE}=    vnfind_by_em:v1:indicators
${SUBSCRIPTIONS_EM_SCOPE}=     vnfind_by_em:v1:subscriptions
${OAUTH_Encryption_ALGORITHM}=      HS256
${NEG_SCOPE}=   vnfind_by_vnf:v2:invalid
${API_VERSION}=     1.12.0

${erroneousVnfInstanceId}    erroneousVnfInstanceId
${POS_FIELDS}     name=vnfIndicator
+63 −7
Changes for SOL002/VNFIndicator-API/IndividualSubscription.robot: 63 added lines, 7 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Resource          environment/variables.txt    # Generic Parameters
Library           jwt
Library           OperatingSystem
Library           REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}    ssl_verify=false

@@ -10,7 +11,7 @@ GET Individual VNF Indicator Subscription
    ...    Test title: Get individual subscription to VNF performance indicators
    ...    Test objective: The objective is to test the retrieval of individual VNF performance indicator subscription and perform a JSON schema validation of the returned subscription data structure
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
@@ -23,7 +24,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier
    ...    Test title: Get individual subscription to VNF performance indicators
    ...    Test objective: The objective is to test that the retrieval of individual VNF performance indicator subscription fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
@@ -36,7 +37,7 @@ DELETE Individual VNF Indicator Subscription
    ...    Test title: Delete individual subscription to VNF performance indicators
    ...    Test objective: The objective is to test the deletion of an individual VNF performance indicator subscription.
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: The subscription to VNF performance indicators is deleted
@@ -49,7 +50,7 @@ DELETE Individual VNF Indicator Subscription with invalid resource identifier
    ...    Test title: Delete individual subscription to VNF performance indicators
    ...    Test objective: The objective is to test that the deletion of an individual VNF performance indicator subscription fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none   
@@ -62,7 +63,7 @@ PUT Individual VNF Indicator Subscription - Method not implemented
    ...    Test title: PUT individual VNF indicator subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF performance indicator subscription
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -74,7 +75,7 @@ PATCH Individual VNF Indicator Subscription - Method not implemented
    ...    Test title: PUT individual VNF indicator subscription - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update an individual VNF performance indicator subscription
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -86,17 +87,42 @@ POST Individual VNF Indicator Subscription - Method not implemented
    ...    Test title: PUT individual VNF indicator subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF performance indicator subscription
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
    Send Post Request for Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    405
GET Individual VNF Indicator Subscription with permitted authorization scope
    [Documentation]    Test ID: 6.3.2.5.8
    ...    Test title: Get individual subscription to VNF performance indicators with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of individual VNF performance indicator subscription and perform a JSON schema validation of the returned subscription data structure with permitted authorization scope
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
    Get Individual VNF Indicator Subscription with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   VnfIndicatorSubscription
GET Individual VNF Indicator Subscription with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.2.5.9
    ...    Test title: Get individual subscription to VNF performance indicators with NOT permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of individual VNF performance indicator subscription and perform a JSON schema validation of the returned subscription data structure with NOT permitted authorization scope
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF.
    ...    Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
    Get Individual VNF Indicator Subscription with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails

*** Keywords ***
Get Individual VNF Indicator Subscription
    Log    Trying to get a given subscription identified by subscriptionId
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${output}=    Output    response
@@ -105,6 +131,7 @@ Get Individual VNF Indicator Subscription
GET Individual VNF Indicator Subscription with invalid resource identifier
    Log    Trying to perform a request on a subscriptionID which doesn't exist
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId}
    ${output}=    Output    response
@@ -113,6 +140,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier
Send Delete Request for Individual VNF Indicator Subscription
    Log    Trying to perform a DELETE on a subscriptionId
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${output}=    Output    response
@@ -121,6 +149,7 @@ Send Delete Request for Individual VNF Indicator Subscription
Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier
    Log    Trying to perform a DELETE on a subscriptionId which doesn't exist
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId}
    ${output}=    Output    response
@@ -136,6 +165,7 @@ Send Post Request for Individual VNF Indicator Subscription
Send Put Request for Individual VNF Indicator Subscription
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${origOutput}=    Output    response
@@ -178,3 +208,29 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted
    Log    Check Postcondition subscription is deleted
    GET Individual VNF Indicator Subscription
    Check HTTP Response Status Code Is    404
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
Get Individual VNF Indicator Subscription with permitted authorization scope
    Log    Trying to get a given subscription identified by subscriptionId with permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${SUBSCRIPTIONS_VNF_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
Get Individual VNF Indicator Subscription with not permitted authorization scope
    Log    Trying to get a given subscription identified by subscriptionId with not permitted authorization scope
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
+77 −12
Changes for SOL002/VNFIndicator-API/IndividualVNFindicator.robot: 77 added lines, 12 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Library           JSONSchemaLibrary    schemas/
Library           jwt
Resource          environment/variables.txt    # Generic Parameters
Library           REST    ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}    ssl_verify=false

@@ -9,7 +10,7 @@ Get Individual Indicator for VNF Instance
    ...    Test title: Get individual performance indicator for a VNF instance
    ...    Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure
    ...    Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
@@ -24,7 +25,7 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier
    ...    Test title: Get individual performance indicator for a VNF instance with invalid indicator identifier
    ...    Test objective: The objective is to test that the retrieval of a performance indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -37,7 +38,7 @@ POST Individual VNF Indicator - Method not implemented
    ...    Test title: POST individual performance indicator for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new performance indicator for a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -49,7 +50,7 @@ PUT Individual VNF Indicator - Method not implemented
    ...    Test title: PUT individual performance indicator for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator for a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -61,7 +62,7 @@ PATCH Individual VNF Indicator - Method not implemented
    ...    Test title: PATCH individual performance indicator for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator for a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -73,7 +74,7 @@ DELETE Individual VNF Indicator - Method not implemented
    ...    Test title: DELETE individual performance indicator indicators for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator for a VNF instance
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -85,7 +86,7 @@ Get Individual Performance Indicator
    ...    Test title: Get Individual Performance Indicator 
    ...    Test objective: The objective is to test the retrieval of a performance indicator and perform a JSON schema validation of the returned indicator data structure
    ...    Pre-conditions: At least one measure of performance indicator is available..
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
@@ -99,7 +100,7 @@ Get Individual Performance Indicator with invalid indicator identifier
    ...    Test title: Get Individual Performance Indicator with invalid indicator identifier
    ...    Test objective: The objective is to test that the retrieval of a performance indicator fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: At least one measure of performance indicator is available.
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -112,7 +113,7 @@ POST Individual Performance Indicator - Method not implemented
    ...    Test title: POST Individual Performance Indicator - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new performance indicator.
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -124,7 +125,7 @@ PUT Individual Performance Indicator - Method not implemented
    ...    Test title: PUT Individual Performance Indicator - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator.
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -136,7 +137,7 @@ PATCH Individual Performance Indicator - Method not implemented
    ...    Test title: PATCH Individual Performance Indicator - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator.
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
@@ -148,17 +149,44 @@ DELETE Individual Performance Indicator - Method not implemented
    ...    Test title: DELETE Individual Performance Indicator - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator.
    ...    Pre-conditions: none
    ...    Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators.
    ...    Post-Conditions: none
    Send DELETE Request for individual indicator
    Check HTTP Response Status Code Is    405
Get Individual Indicator for VNF Instance with permitted authorization scope
    [Documentation]    Test ID: 6.3.2.3.13
    ...    Test title: Get individual performance indicator for a VNF instance with permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure with permitted authorization scope
    ...    Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
    Get Individual Indicator for a VNF instance with permitted authorization scope
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfIndicator
    Check HTTP Response Body Includes Requested VNF Instance ID
    Check HTTP Response Body Includes Requested Indicator ID
Get Individual Indicator for VNF Instance with NOT permitted authorization scope
    [Documentation]    Test ID: 6.3.2.3.14
    ...    Test title: Get individual performance indicator for a VNF instance with NOT permitted authorization scope
    ...    Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure with NOT permitted authorization scope
    ...    Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
    ...    Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VE
    ...    Applicability: The VNF supports the generation and maintenance of performance indicators
    ...    Post-Conditions: none
    Get Individual Indicator for a VNF instance with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is   ProblemDetails
    
*** Keywords ***
Get Individual Indicator for a VNF instance
    Log    This resource represents a VNF indicator related to a VNF instance.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
@@ -167,6 +195,7 @@ Get Individual Indicator for a VNF instance
Get Individual Indicator for a VNF instance with invalid indicator identifier
    Log    Trying to perform a negative get, using wrong identifier
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId}
    ${output}=    Output    response
@@ -175,6 +204,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier
Send POST Request for individual indicator in VNF instance
    Log    Trying to perform a POST (method should not be implemented)
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId}
    ${output}=    Output    response
@@ -183,6 +213,7 @@ Send POST Request for individual indicator in VNF instance
Send PUT Request for individual indicator in VNF instance
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
@@ -191,6 +222,7 @@ Send PUT Request for individual indicator in VNF instance
Send PATCH Request for individual indicator in VNF instance
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
@@ -199,6 +231,7 @@ Send PATCH Request for individual indicator in VNF instance
Send DELETE Request for individual indicator in VNF instance
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
@@ -235,6 +268,7 @@ Check HTTP Response Body Includes Requested VNF Instance ID
Get Individual Indicator
    Log    This resource represents a VNF indicator related to a VNF instance.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId}
    ${output}=    Output    response
@@ -243,6 +277,7 @@ Get Individual Indicator
Get Individual Indicator with invalid indicator identifier
    Log    Trying to perform a negative get, using wrong identifier
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousIndicatorId}
    ${output}=    Output    response
@@ -251,6 +286,7 @@ Get Individual Indicator with invalid indicator identifier
Send POST Request for individual indicator
    Log    Trying to perform a POST (method should not be implemented)
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId}
    ${output}=    Output    response
@@ -259,6 +295,7 @@ Send POST Request for individual indicator
Send PUT Request for individual indicator
    Log    Trying to perform a PUT. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PUT    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId}
    ${output}=    Output    response
@@ -267,6 +304,7 @@ Send PUT Request for individual indicator
Send PATCH Request for individual indicator
    Log    Trying to perform a PATCH. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId}
    ${output}=    Output    response
@@ -275,7 +313,34 @@ Send PATCH Request for individual indicator
Send DELETE Request for individual indicator
    Log    Trying to perform a DELETE. This method should not be implemented
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    DELETE    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output} 
JWT Encode
    [Arguments]    ${payload}    ${key}    ${algorithm}
    ${encoded}=    Evaluate    jwt.encode(${payload}, ${key}, ${algorithm})
    [Return]    ${encoded}
Get Individual Indicator for a VNF instance with permitted authorization scope
    Log    This resource represents a VNF indicator related to a VNF instance with permitted authorization scope.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${INDICATORS_EM_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
Get Individual Indicator for a VNF instance with not permitted authorization scope
    Log    This resource represents a VNF indicator related to a VNF instance with not permitted authorization scope.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    ${scope_value}=    Create Dictionary    scopeValue=${NEG_SCOPE}
    ${authorizationToken}=    JWT Encode    payload=${scope_value}    key=''    algorithm=${OAUTH_Encryption_ALGORITHM}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${authorizationToken}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
 No newline at end of file
+15 −7
Changes for SOL002/VNFIndicator-API/NotificationEndpoint.robot: 15 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ VNF Indicator Value Change Notification
    ...    Test title: VNF Indicator Value Change Notification
    ...    Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification .
    ...    Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNF.
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -24,7 +24,7 @@ Supported Indicators Change Notification
    ...    Test title: Supported Indicators Change Notification
    ...    Test objective: The objective is to test that the POST request triggers Supported Indicators Change Notification .
    ...    Pre-conditions: A VNF is instantiated, and a subscription for supported indicators change notifications is available in the VNF.
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -36,7 +36,7 @@ Test the Notification Endpoint - Successful
    ...    Test title: Test the Notification Endpoint - Successful
    ...    Test objective: The objective is to test the Notification Endpoint provided by the notification consumer.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 8.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -48,7 +48,7 @@ Test the Notification Endpoint - NOT FOUND
    ...    Test title: Test the Notification Endpoint - UNREACHABLE
    ...    Test objective: The objective is to test the Notification Endpoint provided by the notification consumer.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 8.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: The notification endpoint is unreachable by the API producer.
    ...    Post-Conditions: none 
@@ -61,7 +61,7 @@ PUT Notification endpoint - Method Not Implemented
    ...    Test title: PUT Notification endpoint - Method Not Implemented
    ...    Test objective: The objective is to test the PUT method for Notification Endpoint provided by the consumer is not implemented.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 8.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -73,7 +73,7 @@ PATCH Notification endpoint - Method Not Implemented
    ...    Test title: PATCH Notification endpoint - Method Not Implemented
    ...    Test objective: The objective is to test the PATCH method for Notification Endpoint provided by the consumer is not implemented.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 8.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -85,7 +85,7 @@ DELETE Notification endpoint - Method Not Implemented
    ...    Test title: DELETE Notification endpoint - Method Not Implemented
    ...    Test objective: The objective is to test the DELETE method for Notification Endpoint provided by the consumer is not implemented.
    ...    Pre-conditions: A notification endpoint is provided by the API consumer upon subscription.
    ...    Reference: Clause 8.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_Notif_Endpoint
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -95,6 +95,7 @@ DELETE Notification endpoint - Method Not Implemented
*** Keywords ***
Check resource existence and get CallbackUri
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}	
@@ -110,6 +111,7 @@ Check HTTP Response Status Code Is
Post Value Change Notification
    log    Trying to perform a POST to get notification
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/ValueChangeNotification.json
@@ -121,6 +123,7 @@ Post Value Change Notification
Post Supported Indicators Change Notification
    log    Trying to perform a POST to get notification
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    ${template} =    Get File    jsons/SupportedIndicatorsChangeNotification.json
@@ -132,6 +135,7 @@ Post Supported Indicators Change Notification
GET reach the notification endpoint  
    Log    Trying to reach the notification endpoint using GET method.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${callbackResp}
    ${outputResponse}=    Output    response
@@ -140,6 +144,7 @@ GET reach the notification endpoint
GET reach an unreachable notification endpoint  
    Log    Trying to reach the notification endpoint using GET method.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    GET    ${unreachable_callback_uri}
    ${outputResponse}=    Output    response
@@ -155,6 +160,7 @@ Check HTTP Response Body Json Schema Is
PUT notification endpoint  
    Log    Trying to perform a PUT. This method should not be implemented.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${callbackResp}
    ${outputResponse}=    Output    response
@@ -163,6 +169,7 @@ PUT notification endpoint
PATCH notification endpoint  
    Log    Trying to perform a PATCH. This method should not be implemented.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${callbackResp}
    ${outputResponse}=    Output    response
@@ -171,6 +178,7 @@ PATCH notification endpoint
DELETE notification endpoint  
    Log    Trying to perform a DELETE. This method should not be implemented.
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Set Headers    {"Version": "${API_VERSION}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${callbackResp}
    ${outputResponse}=    Output    response
+2 −2
Changes for SOL002/VNFIndicator-API/Notifications.robot: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ VNF Indicator Value Change Notification
    ...    Test title: VNF Indicator Value Change Notification
    ...    Test objective: The objective is to test the dispatch of VNF Indicator Value Change Notification when new indicator values are available in the VNF, 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 is instantiated, and a subscription for indicator value change notifications is available in the VNF.
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNF
    ...    Applicability: none
    ...    Post-Conditions: none 
@@ -29,7 +29,7 @@ Supported Indicators Change Notification
    ...    Test title: Supported Indicators Change Notification
    ...    Test objective: The objective is to test the dispatch of Supported Indicators Change Notification when new indicator values are available in the VNF, 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 is instantiated, and a subscription for supported indicators change notifications is available in the VNF.
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1
    ...    Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1
    ...    Config ID: Config_prod_VNF
    ...    Applicability: none
    ...    Post-Conditions: none 
Loading
Loading