diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 71537aded9db55313d8db9601d581eec176fed85..41d883020fe1773dfad6b069a2371b5e60d1e163 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -34,7 +34,7 @@ Get VNF Indicators with attribute-based filter Check HTTP Response Body Json Schema Is vnfIndicators Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter -Get all VNF Indicators with invalid attribute-based filter +Get VNF Indicators with invalid attribute-based filter [Documentation] Test ID: 6.3.2.1.3 ... Test title: Get VNF Indicators with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. @@ -121,7 +121,7 @@ PUT all VNF Indicators - Method not implemented PATCH all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.10 - ... Test title: POST all VNF Indicators - Method not implemented + ... Test title: PATCH all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF ... Reference: section 8.4.2.3.4 - SOL002 v2.4.1 @@ -133,7 +133,7 @@ PATCH all VNF Indicators - Method not implemented DELETE all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.11 - ... Test title: POST all VNF Indicators - Method not implemented + ... Test title: DELETE all VNF Indicators - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF ... Reference: section 8.4.2.3.5 - SOL002 v2.4.1 diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 3e49746813efa0a41e60f4367b91fcb7f6e49916..c78bf5b9cb5a030b1148412238e2c558d0b33516 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -2,94 +2,96 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/individualSubscription.txt +Resource VNFIndicatorsKeywords.robot Library OperatingSystem Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** -GET Individual Subscription - Log Trying to get a given subscription identified by subscriptionId - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 200 - Log Received a 200 OK as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Log Trying to validate result with VnfIndicatorSubscription schema - Validate Json VnfIndicatorSubscription.schema.json ${result} - Log Validated VnfIndicatorSubscription schema +GET Individual VNF Indicator Subscription + [Documentation] Test ID: 7.3.6.5.1 + ... Test title: GET Individual VNF Indicator Subscription + ... Test objective: The objective is to test the retrieval of individual VNF 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 VNFM. + ... Reference: section 8.4.6.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual VNF Indicator Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is VnfIndicatorSubscription -GET Subscription - Negative (Not Found) - Log Trying to perform a request on a subscriptionID which doesn't exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${problemDetails}= Output response body - Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET Individual VNF Indicator Subscription with invalid resource identifier + [Documentation] Test ID: 7.3.6.5.2 + ... Test title: GET Individual VNF Indicator Subscription with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of individual VNF indicator subscription fails when using an invalid resource identifier. + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.6.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Indicator Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 -GET Subscription - Negative (Unauthorized: Wrong Token) - Log Trying to perform a negative get, using wrong authorization bearer - Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication - Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 401 - Log Received 401 Unauthorized as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +DELETE Individual VNF Indicator Subscription + [Documentation] Test ID: 7.3.6.5.3 + ... Test title: DELETE Individual VNF Indicator Subscription + ... Test objective: The objective is to test the deletion of an individual VNF indicator subscription. + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.6.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The subscription to VNF indicators is deleted + Send Delete Request for Individual VNF Indicator Subscription + Check HTTP Response Status Code Is 204 + Check Postcondition Individual VNF Indicator Subscription is Deleted -DELETE Subscription - Log Trying to perform a DELETE on a subscriptionId - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 204 - Log Received 204 No Content as expected +DELETE Individual VNF Indicator Subscription with invalid resource identifier + [Documentation] Test ID: 7.3.6.5.4 + ... Test title: DELETE Individual VNF Indicator Subscription with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual VNF indicator subscription fails when using an invalid resource identifier. + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.6.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 -DELETE Subscription - Negative (Not Found) - Log Trying to perform a DELETE on a subscriptionId which doesn't exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - Integer response status 404 - Log The subscriptionId is not present in database - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${problemDetails}= Output - Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +PUT Individual VNF Indicator Subscription - Method not implemented + [Documentation] Test ID: 7.3.6.5.5 + ... 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 indicator subscription + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.6.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + Send Put Request for Individual VNF Indicator Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition VNF indicator subscription Unmodified (Implicit) -PUT Subscription - (Method not implemented) - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH Individual VNF Indicator Subscription - Method not implemented + [Documentation] Test ID: 7.3.6.5.6 + ... Test title: PATCH 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 indicator subscription + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.6.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + Send Patch Request for Individual VNF Indicator Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition VNF indicator subscription Unmodified (Implicit) -PATCH Subscription - (Method not implemented) - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -POST Subscription - (Method not implemented) - Log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 405 - Log Received 405 Method not implemented as expected +POST Individual VNF Indicator Subscription - Method not implemented + [Documentation] Test ID: 7.3.6.5.7 + ... Test title: POST Individual VNF Indicator Subscription - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator subscription + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.6.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The individual VNF indicator subscription is not created by the operation + Send Post Request for Individual VNF Indicator Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition VNF indicator subscription is not created \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index 37edb4cab5166d74da071dc9b67b1accf8d66d99..2dc10dd89f6905102110ed2d16013459907e640c 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -2,93 +2,82 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/individualVnfIndicator.txt +Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** -GET Individual VNF Indicator - Log The GET method reads a VNF indicator. - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicator.schema.json ${result} - Log Validation OK +Get Individual Indicator for VNF Instance + [Documentation] Test ID: 7.3.6.3.1 + ... Test title: Get Individual Indicator for VNF Instance + ... Test objective: The objective is to test the retrieval of an 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 VNF indicator is available in the VNFM. + ... Reference: section 8.4.4.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Indicator for a VNF instance + 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 VNF Indicator - Negative (Not Found) - Log Trying to perform a negative get, using an erroneous package ID - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get Individual Indicator for VNF Instance with invalid indicator identifier + [Documentation] Test ID: 7.3.6.3.2 + ... Test title: Get Individual Indicator for VNF Instance with invalid indicator identifier + ... Test objective: The objective is to test that the retrieval of an 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 VNF indicator is available in the VNFM. + ... Reference: section 8.4.4.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Indicator for a VNF instance with invalid indicator identifier + Check HTTP Response Status Code Is 404 -GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token) - Log Trying to perform a negative get, using wrong authorization bearer - Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication - Set Headers {"Accept" : "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 401 - Log Received 401 Unauthorized as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +POST Individual VNF Indicator for VNF Instance - Method not implemented + [Documentation] Test ID: 7.3.6.3.3 + ... Test title: POST Individual VNF Indicator for VNF Instance - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator in the VNFM + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.4.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send POST Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 -GET Individual VNF Indicator - Negative (Unauthorized: No Token) - Log Trying to perform a negative get, without authentication token. - Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication - Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 401 - Log Received 401 Unauthozired as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +PUT Individual VNF Indicator for VNF Instance - Method not implemented + [Documentation] Test ID: 7.3.6.3.4 + ... Test title: PUT Individual VNF Indicator for VNF Instance - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify an existing indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM + ... Reference: section 8.4.4.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 -POST Individual VNF Indicator (Method not implemented) - Log Trying to perform a POST (method should not be implemented) - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH Individual VNF Indicator for VNF Instance - Method not implemented + [Documentation] Test ID: 7.3.6.3.5 + ... Test title: PATCH Individual VNF Indicator for VNF Instance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update an existing indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available for the given VNF instance. + ... Reference: section 8.4.4.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 -PUT Individual VNF Indicator (Method not implemented) - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -PATCH Individual VNF Indicator (Method not implemented) - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -DELETE Individual VNF Indicator (Method not implemented) - Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 405 - Log Received 405 Method not implemented as expected +DELETE Individual VNF Indicator for VNF Instance - Method not implemented + [Documentation] Test ID: 7.3.6.3.6 + ... Test title: DELETE Individual VNF Indicator for VNF Instance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing indicator for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM + ... Reference: section 8.4.3.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operation + Send DELETE Request for individual indicator in VNF instance + Check HTTP Response Status Code Is 405 + Check Postcondition Indicator for VNF instance Exist \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index 9939019503bd0bdf21dbf9c9a5213bc0648ff9ad..fc3a9b7b0712f72b8fc2604859f180f7b7fdfe5f 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -12,76 +12,138 @@ Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true *** Test Cases *** -GET All VNF Indicators Subscriptions +GET All VNF Indicator Subscriptions + [Documentation] Test ID: 7.3.6.4.1 + ... Test title: GET All VNF Indicator Subscriptions + ... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions and perform a JSON schema validation of the returned subscriptions data structure + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Get All VNF Indicators Subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfIndicatorSubscriptions - -GET VNF Indicators Subscriptions with attribute-based filter +GET VNF Indicator Subscriptions with attribute-based filter + [Documentation] Test ID: 7.3.6.4.2 + ... Test title: GET VNF Indicator Subscriptions with attribute-based filter + ... Test objective: The objective is to test the retrieval of VNF indicator subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Get VNF Indicators Subscriptions with filter Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfIndicatorSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - -GET VNF Indicators Subscriptions with invalid attribute-based filter +GET VNF Indicator Subscriptions with invalid attribute-based filter + [Documentation] Test ID: 7.3.6.4.3 + ... Test title: GET VNF Indicator Subscriptions with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Get VNF Indicators Subscriptions with invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET VNF Indicators Subscriptions with invalid resource endpoint +GET VNF Indicator Subscriptions with invalid resource endpoint + [Documentation] Test ID: 7.3.6.4.4 + ... Test title: GET VNF Indicator Subscriptions with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of all VNF indicator subscriptions fails when using invalid resource endpoint. + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Get VNF Indicators Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 - -GET VNF Indicators Subscriptions with invalid authentication token - Get VNF Indicators Subscriptions with invalid authentication token - Check HTTP Response Status Code Is 401 - Check HTTP Response Body Json Schema Is ProblemDetails - - Create new VNF indicator subscription + [Documentation] Test ID: 7.3.6.4.5 + ... Test title: Create new VNF indicator subscription + ... Test objective: The objective is to test the creation of a new VNF indicator subscription and perform a JSON schema and content validation of the returned subscription data structure + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF indicator subscription is successfully set and it matches the issued subscription Send Post Request for VNF Indicator Subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is VnfIndicatorSubscription Check HTTP Response Body Matches the Subscription Check Postcondition VNF Indicator Subscription Is Set - - -Create duplicated VNF indicator subscription with duplication handler +Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions + [Tags] no-duplicated-subs + [Documentation] Test ID: 7.3.6.4.6 + ... Test title: Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions + ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF indicator subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNFM does not support the creation of duplicated subscriptions + ... Post-Conditions: The existing VNF indicator subscription returned is available in the VNFM Send Post Request for Duplicated VNF indicator Subscription Check HTTP Response Status Code Is 303 Check HTTP Response Body Is Empty Check HTTP Response Header Contains Location - Check Postcondition VNF indicator Subscription Is Set Location - - -Create duplicated VNF indicator subscription without duplication handler + Check Postcondition Subscription Resource Returned in Location Header Is Available + +Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions + [Tags] duplicated-subs + [Documentation] Test ID: 7.3.6.4.7 + ... Test title: Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions + ... Test objective: The objective is to test the creation of a duplicated VNF indicator subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNFM supports the creation of duplicated subscriptions + ... Post-Conditions: The duplicated VNF indicator subscription is successfully set and it matches the issued subscription Send Post Request for Duplicated VNF indicator Subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Matches the Subscription Check Postcondition VNF indicator Subscription Is Set - - - PUT VNF Indicator Subscriptions - Method not implemented + [Documentation] TTest ID: 7.3.6.4.8 + ... Test title: PUT VNF Indicator Subscriptions - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicator subscriptions + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Send Put Request for VNF Indicator Subscriptions Check HTTP Response Status Code Is 405 - - PATCH VNF Indicator Subscriptions - Method not implemented + [Documentation] Test ID: 7.3.6.4.9 + ... Test title: PATCH VNF Indicator Subscriptions - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicator subscriptions + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none Send Patch Request for VNF Indicator Subscriptions Check HTTP Response Status Code Is 405 - DELETE VNF Indicator Subscriptions - Method not implemented + [Documentation] Test ID: 7.3.6.4.10 + ... Test title: DELETE VNF Indicator Subscriptions - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators subscriptions + ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. + ... Reference: section 8.4.5.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation Send Delete Request for VNF Indicator Subscriptions Check HTTP Response Status Code Is 405 - - + Check Postcondition VNF Indicator Subscriptions Exists diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index d5bc0453d75120a2c5214c119dc0efe43f2867c1..b4c9f087e468cb2e93d1070cafbe663b237a5d0f 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -3,122 +3,143 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Resource environment/vnfIndicators.txt +Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** -GET all Indicators - Log The GET method queries multiple VNF indicators - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK +Get all VNF Indicators + [Documentation] Test ID: 7.3.6.1.1 + ... Test title: Get all VNF Indicators + ... Test objective: The objective is to test the retrieval of all the available VNF indicators and perform a JSON schema validation of the collected indicators data structure + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all VNF indicators + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + +Get VNF Indicators with attribute-based filter + [Documentation] Test ID: 7.3.6.1.2 + ... Test title: Get VNF Indicators with attribute-based filter + ... Test objective: The objective is to test the retrieval of VNF indicators using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get VNF indicators with filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter -GET all Indicators - Filter - Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK +Get VNF Indicators with invalid attribute-based filter + [Documentation] Test ID: 7.3.6.1.3 + ... Test title: Get VNF Indicators with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get VNF indicators with invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -GET all Indicators - Negative (wronge filter name) - Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters. Negative case, with erroneous attribute name - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} - Integer response status 400 - Log Received 400 Bad Request as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get all VNF Indicators with malformed authorization token + [Documentation] Test ID: 7.3.6.1.4 + ... Test title: Get all VNF Indicators with malformed authorization token + ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using malformed authorization token + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNFM requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + Get all VNF indicators with malformed authorization token + Check HTTP Response Status Code Is 400 -GET all Indicators - Negative (Unauthorized: Wrong Token) - Log Trying to perform a negative get, using wrong authorization bearer - Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM \ is not supporting authentication - Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 401 - Log Received 401 Unauthorized as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get all VNF Indicators without authorization token + [Documentation] Test ID: 7.3.6.1.5 + ... Test title: Get all VNF Indicators without authorization token + ... Test objective: The objective is to test that the retrieval of VNF indicators fails when omitting the authorization token + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + Get all VNF indicators without authorization token + Check HTTP Response Status Code Is 401 -GET all Indicators - Negative (Unauthorized: No Token) - Log Trying to perform a negative get, using wrong authorization bearer - Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication - Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 401 - Log Received 401 Unauthorized as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET all VNF Indicators with expired or revoked authorization token + [Documentation] Test ID: 7.3.6.1.6 + ... Test title: GET all VNF Indicators with expired or revoked authorization token + ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using expired or revoked authorization token + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. + ... Post-Conditions: none + Get all VNF indicators with expired or revoked authorization token + Check HTTP Response Status Code Is 401 -GET all Indicators (Negative: Not found) - Log Trying to perform a GET on a erroneous URI - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicator - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get all VNF Indicators with invalid resource endpoint + [Documentation] Test ID: 7.3.6.1.7 + ... Test title: Get all VNF Indicators with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid resource endpoint + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. + ... Reference: section 8.4.2.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all VNF indicators with invalid resource endpoint + Check HTTP Response Status Code Is 404 -POST all Indicators (Method not implemented) - Log Trying to perform a POST (method should not be implemented) - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 405 - Log Received 405 Method not implemented as expected +POST all VNF Indicators - Method not implemented + [Documentation] Test ID: 7.3.6.1.8 + ... Test title: POST all VNF Indicators - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new VNF indicators + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM + ... Reference: section 8.4.2.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send POST Request for all VNF indicators + Check HTTP Response Status Code Is 405 -PUT all Indicators (Method not implemented) - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT all VNF Indicators - Method not implemented + [Documentation] Test ID: 7.3.6.1.9 + ... Test title: PUT all VNF Indicators - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicators + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM + ... Reference: section 8.4.2.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for all VNF indicators + Check HTTP Response Status Code Is 405 -PATCH all Indicators (Method not implemented) - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 405 - Log Received 405 Method not implemented as expected - -DELETE all Indicators (Method not implemented) - Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators - Integer response status 405 - Log Received 405 Method not implemented as expected +PATCH all VNF Indicators - Method not implemented + [Documentation] Test ID: 7.3.6.1.10 + ... Test title: PATCH all VNF Indicators - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF + ... Reference: section 8.4.2.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all VNF indicators + Check HTTP Response Status Code Is 405 +DELETE all VNF Indicators - Method not implemented + [Documentation] Test ID: 7.3.6.1.11 + ... Test title: DELETE all VNF Indicators - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF + ... Reference: section 8.4.2.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF indicators are not deleted by the unsuccessful operation + Send DELETE Request for all VNF indicators + Check HTTP Response Status Code Is 405 + Check Postcondition VNF Indicators Exist diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 00cf1f7a0e59f43f2540017e57a33ab1e19486db..a0d2ef119cdec162bf71a001b39dcdb1b792f590 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -1,6 +1,10 @@ *** Settings *** Resource environment/variables.txt Resource environment/subscriptions.txt +Resource environment/vnfIndicators.txt +Resource environment/vnfIndicatorinVnfInstance.txt +Resource environment/individualVnfIndicator.txt +Resource environment/individualSubscription.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -161,15 +165,11 @@ Send Delete Request for VNF Indicator Subscriptions ${output}= Output response Set Suite Variable ${response} ${output} - - Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal ${response['status']} ${expected_status} Log Status code validated - - Check HTTP Response Body Json Schema Is [Arguments] ${input} Should Contain ${response['headers']['Content-Type']} application/json @@ -177,17 +177,14 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK - Check HTTP Response Body Is Empty Should Be Empty ${response['body']} Log No json schema is provided. Validation OK - Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter #TODO - Check HTTP Response Body Matches the Subscription Log Check Response matches subscription ${body}= Get File jsons/subscriptions.json @@ -195,7 +192,6 @@ Check HTTP Response Body Matches the Subscription Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} - Check Postcondition VNF Indicator Subscription Is Set [Arguments] ${location}="" Log Check Postcondition subscription exist @@ -207,13 +203,345 @@ Check Postcondition VNF Indicator Subscription Is Set ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 - + +Check Postcondition Subscription Resource Returned in Location Header Is Available + Log Going to check postcondition + GET ${response.headers['Location']} + Integer response status 200 + Log Received a 200 OK as expected + ${contentType}= Output response headers Content-Type + Should Contain ${contentType} application/json + ${result}= Output response body + Validate Json VnfIndicatorSubscription.schema.json ${result} + Log Validated VnfIndicatorSubscription schema Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} Should Contain ${response.headers} ${CONTENT_TYPE} Log Header is present +Get all VNF indicators + Log The GET method queries multiple VNF indicators + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + ${body}= evaluate json.loads('''${response.body}''') json + Set Suite Variable @{vnfIndicators} ${body} + +Get VNF indicators with filter + Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get VNF indicators with invalid filter + Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all VNF indicators with malformed authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication + Log The GET method queries multiple VNF indicators using invalid token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all VNF indicators with expired or revoked authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication + Log The GET method queries multiple VNF indicators using invalid token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all VNF indicators without authorization token + Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication + Log The GET method queries multiple VNF indicators omitting token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all VNF indicators with invalid resource endpoint + Log The GET method queries multiple VNF indicators omitting token + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for all VNF indicators + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for all VNF indicators + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for all VNF indicators + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for all VNF indicators + log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiVersion}/indicators + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition VNF Indicators Exist + Log Check Postcondition indicators exist + Get all VNF indicators + Check HTTP Response Status Code Is 200 + +Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter + Log Check Response includes VNF Indicators according to filter + #todo + +Get all indicators for a VNF instance + Log This resource represents VNF indicators related to a VNF instance. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all indicators for a VNF instance with filter + Log This resource represents VNF indicators related to a VNF instance. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all indicators for a VNF instance with invalid filter + Log This resource represents VNF indicators related to a VNF instance. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get all indicators for a VNF instance with invalid resource identifier + Log Trying to perform a negative get, using wrong identifier + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for indicators in VNF instance + Log Trying to perform a POST (method should not be implemented) + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for indicators in VNF instance + Log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for indicators in VNF instance + Log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for indicators in VNF instance + Log Trying to perform a DELETE. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Body Includes Requested VNF Instances ID + Log Check Response includes Indicators according to resource identifier + #todo + +Check Postcondition Indicators for VNF instance Exist + Log Check Response includes VNF Indicators according to filter + #todo + +Get Individual Indicator for a VNF instance + Log This resource represents a VNF indicator related to a VNF instance. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Body Includes Requested Indicator ID + Log Check Response includes propoer VNF instance and Indicator identifiers + Should Be Equal ${response['body']['id']} ${indicatorId} + +Check HTTP Response Body Includes Requested VNF Instance ID + Log Check Response includes propoer VNF instance and Indicator identifiers + Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} + +Check Postcondition Indicator for VNF instance Exist + Log Check Response includes VNF Indicator + Get Individual Indicator for a VNF instance + Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} + Should Be Equal ${response['body']['id']} ${indicatorId} + +Check Postcondition VNF Indicator Subscriptions Exists + Log Checking that subscriptions exists + Get all VNF Indicators Subscriptions + +GET Individual VNF Indicator Subscription + Log Trying to get a given subscription identified by subscriptionId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Delete Request for Individual VNF Indicator Subscription + Log Trying to perform a DELETE on a subscriptionId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request for Individual VNF Indicator Subscription + Log Trying to create a new subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch Request for Individual VNF Indicator Subscription + Log Trying to create a new subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +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 + +Check Postcondition VNF indicator subscription Unmodified (Implicit) + Log Check Postcondition subscription is not modified + GET Individual VNF Indicator Subscription + Log Check Response matches original subscription + ${subscription}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} + +Check Postcondition VNF indicator subscription is not created + Log Check Postcondition subscription is not created + GET Individual VNF Indicator Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 Create Sessions Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index de397433ab367f4f85d242f1b737e9a42990b0a2..9ac4c8beecf49e813f98c271319fdfa8cd7ea793 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -2,91 +2,111 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/vnfIndicatorinVnfInstance.txt +Resource VNFIndicatorsKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** -GET Indicators on VNF Instance - Log This resource represents VNF indicators related to a VNF instance. - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK - -GET Indicators on VNF Instance - Filter - Log This resource represents VNF indicators related to a VNF instance. - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} - Integer response status 200 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json vnfIndicators.schema.json ${result} - Log Validation OK +*** Test Cases *** +Get Indicators for VNF Instance + [Documentation] Test ID: 7.3.6.2.1 + ... Test title: Get Indicators for VNF Instance + ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all indicators for a VNF instance + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + Check HTTP Response Body Includes Requested VNF Instances ID -GET Indicators on VNF Instance - Negative Filter - Log This resource represents VNF indicators related to a VNF instance. - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} - Integer response status 400 - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET Indicators for VNF Instance with attribute-based filter + [Documentation] Test ID: 7.3.6.2.2 + ... Test title: GET Indicators for VNF Instance with attribute-based filter + ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all indicators for a VNF instance with filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfIndicators + Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter -GET Indicators on VNF Instance - Negative (Not Found) - Log Trying to perform a negative get, using wrong authorization bearer - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} - Integer response status 404 - Log Received 404 Not Found as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +Get Indicators for VNF Instance with invalid attribute-based filter + [Documentation] Test ID: 7.3.6.2.3 + ... Test title: Get Indicators for VNF Instance with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all indicators for a VNF instance with invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -POST Indicators on VNF Instance - (Method not implemented) - Log Trying to perform a POST (method should not be implemented) - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected +Get Indicators for VNF Instance with invalid resource identifier + [Documentation] Test ID: 7.3.6.2.4 + ... Test title: Get Indicators for VNF Instance with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.2 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get all indicators for a VNF instance with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails -PUT Indicators on VNF Instance - (Method not implemented) - Log Trying to perform a PUT. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected +POST Indicators for VNF instance - Method not implemented + [Documentation] Test ID: 7.3.6.2.5 + ... Test title: POST Indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: section 8.4.3.3.1 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send POST Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 -PATCH Indicators on VNF Instance - (Method not implemented) - Log Trying to perform a PATCH. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT Indicators for VNF instance - Method not implemented + [Documentation] Test ID: 7.3.6.2.6 + ... Test title: PUT Indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify existing indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.3 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 -DELETE Indicators on VNF Instance - (Method not implemented) - Log Trying to perform a DELETE. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Log Received 405 Method not implemented as expected +PATCH Indicators for VNF instance - Method not implemented + [Documentation] Test ID: 7.3.6.2.7 + ... Test title: PATCH Indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update existing indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.4 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 +DELETE Indicators for VNF instance - Method not implemented + [Documentation] Test ID: 7.3.6.2.8 + ... Test title: DELETE Indicators for VNF instance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance + ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. + ... Reference: section 8.4.3.3.5 - SOL003 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation + Send DELETE Request for indicators in VNF instance + Check HTTP Response Status Code Is 405 + Check Postcondition Indicators for VNF instance Exist diff --git a/SOL003/VNFIndicator-API/environment/individualSubscription.txt b/SOL003/VNFIndicator-API/environment/individualSubscription.txt index e4a953e55b8c76f0e6b2cb44b02e4b67a0bd00be..a85388af9a9ca756b625f7cb0cc8fce61effa99f 100644 --- a/SOL003/VNFIndicator-API/environment/individualSubscription.txt +++ b/SOL003/VNFIndicator-API/environment/individualSubscription.txt @@ -1,4 +1,7 @@ *** Variables *** -${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 -${erroneousSubscriptionId} erroneousSubscriptionId # Not existing ID on the subscriptions +${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa +${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId +${response} httpresponse +${origResponse} httpresponse diff --git a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt index 6798791e5199b546785f726cf5b08d540a05c0eb..4d088c79bb4b68e1f1cd0613fd1ed1e4799f01b4 100644 --- a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt +++ b/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt @@ -1,4 +1,7 @@ *** Variables *** ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 ${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 +${notAllowedIndicatorId} notAllowedId ${erroneousIndicatorId} erroneousIndicatorId +${response}= httpresponse + diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 3bfdf323a52ba78cdf7dac127905a7564263270b..6fe8d3117d49640b672d112f2ac0d3ede582589a 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -5,6 +5,7 @@ ${VNFM_SCHEMA} https ${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION} Bearer negativetoken +${BAD_AUTHORIZATION} Bear sometoken ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json