From 21b067fa10cee5b1a62fe8ade38eeb58ff5fbfec Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Fri, 21 Jun 2019 18:23:42 +0200 Subject: [PATCH] added doc for SOL005 NS performance mgmt --- .../IndividualSubscription.robot | 154 ++++---- .../NSDManagementKeywords.robot | 93 ++++- SOL005/NSDManagement-API/NSDescriptors.robot | 26 +- .../environment/individualSubscription.txt | 3 + .../NSPerformanceManagementKeywords.robot | 167 ++++++++- .../NSPerformanceManagement-API/PMJobs.robot | 328 ++++++++---------- 6 files changed, 505 insertions(+), 266 deletions(-) diff --git a/SOL005/NSDManagement-API/IndividualSubscription.robot b/SOL005/NSDManagement-API/IndividualSubscription.robot index 8d723e40..a2295dd7 100644 --- a/SOL005/NSDManagement-API/IndividualSubscription.robot +++ b/SOL005/NSDManagement-API/IndividualSubscription.robot @@ -2,84 +2,98 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/individualSubscription.txt +Resource NSDManagementKeywords.robot Library OperatingSystem Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} *** Test Cases *** -GET Individual Subscription - Log Trying to get a single 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} ${CONTENT_TYPE_JSON} - ${result}= Output response body - Validate Json NsdmSubscription.schema.json ${result} - Log Validated NsdmSubscription schema +GET Individual NSD Management Subscription + [Documentation] Test ID: 5.3.1.8.1 + ... Test title: GET Individual NSD Management Subscription + ... Test objective: The objective is to test the retrieval of individual NSD Management subscription and perform a JSON schema and content validation of the returned subscription data structure + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Individual NSD Management Subscription + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PkgmSubscription + Check HTTP Response Body Subscription Identifier matches the requested Subscription -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} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET Individual NSD Management Subscription with invalid resource identifier + [Documentation] Test ID: 5.3.1.8.2 + ... Test title: GET Individual NSD Management Subscription with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual NSD Management subscription fails when using an invalid resource identifier + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET individual NSD Management Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 -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 NSD Management Subscription with invalid resource identifier + [Documentation] Test ID: 5.3.1.8.3 + ... Test title: DELETE Individual NSD Management Subscription with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual NSD Management subscription fails when using an invalid resource identifier + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual NSD Management Subscription with invalid resource identifier + Check HTTP Response Status Code Is 404 +POST Individual NSD Management Subscription - Method not implemented + [Documentation] Test ID: 5.3.1.8.4 + ... Test title: POST Individual NSD Management Subscription - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new NSD Management Subscription + ... Pre-conditions: none + ... Reference: section 5.4.9.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NSD Management Subscription is not created on the NFVO + Send Post request for individual NSD Management Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NSD Management Subscription is not Created -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} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response body - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +PUT Individual NSD Management Subscription - Method not implemented + [Documentation] Test ID: 5.3.1.8.5 + ... Test title: PUT Individual NSD Management Subscription - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing NSD Management subscription + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NSD Management subscription is not modified by the operation + Send Put request for individual NSD Management Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NSD Management Subscription is Unmodified (Implicit) -PUT Subscription - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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 NSD Management Subscription - Method not implemented + [Documentation] Test ID: 5.3.1.8.6 + ... Test title: PATCH Individual NSD Management Subscription - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NSD Management subscription + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NSD Management subscription is not modified by the operation + Send Patch request for individual NSD Management Subscription + Check HTTP Response Status Code Is 405 + Check Postcondition NSD Management Subscription is Unmodified (Implicit) -PATCH Subscription - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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 +DELETE Individual NSD Management Subscription + [Documentation] Test ID: 5.3.1.8.7 + ... Test title: DELETE Individual NSD Management Subscription + ... Test objective: The objective is to test the deletion of an individual NSD Management subscription + ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. + ... Reference: section 5.4.9.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NSD Management Subscription is not available anymore in the NFVO + Send Delete request for individual NSD Management Subscription + Check HTTP Response Status Code Is 204 + Check Postcondition NSD Management Subscription is Deleted \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 8ad586ac..6b9bf1b5 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -2,7 +2,8 @@ Resource environment/variables.txt Resource environment/subscriptions.txt Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters -Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters +Resource environment/pnfDescriptors.txt # Specific pnfDescriptors Parameters +Resource environment/individualSubscription.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -114,7 +115,7 @@ Check HTTP Response Body NsdInfos Matches the requested fields selector Log Validation for schema OK GET all Network Service Descriptors Information with exclude_fields attribute selector - Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params + Log Trying to get all NSD Managements present in the NFVO Catalogue, using filter params Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -344,7 +345,7 @@ Get single file NSD Content in Plain or Zip Format Set Suite Variable ${response} ${output} Get multi file NSD Content in Plain or Zip Format - Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -370,7 +371,7 @@ Get NSD Content with invalid resource identifier Set Suite Variable ${response} ${output} Get NSD Content with conflict due to onboarding state - Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -890,7 +891,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Log Check Response includes VNF Package Management according to filter + Log Check Response includes NSD Management Management according to filter #TODO @@ -924,6 +925,88 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Validate Json NsdmSubscription.schema.json ${result} Log Validated NsdmSubscription schema +Get Individual NSD Management Subscription + Log Trying to get a single 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 NSD Management 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 NSD Management 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} + +Check Postcondition NSD Management Subscription is Deleted + Log Check Postcondition Subscription is deleted + GET individual NSD Management Subscription + Check HTTP Response Status Code Is 404 + +Send Delete request for individual NSD Management 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 NSD Management Subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual NSD Management 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} + PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual NSD Management 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 NSD Management Subscription is Unmodified (Implicit) + Log Check postconidtion subscription not modified + GET individual NSD Management Subscription + Log Check Response matches original VNF Threshold + ${subscription}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['id']} ${subscription.id} + Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} + +Check Postcondition NSD Management Subscription is not Created + Log Trying to get a new subscription + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + ${output}= Output response + Set Suite Variable @{response} ${output} + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Subscription Identifier matches the requested Subscription + Log Trying to check response ID + Should Be Equal ${response['body']['id']} ${subscriptionId} + Log Subscription identifier as expected Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} diff --git a/SOL005/NSDManagement-API/NSDescriptors.robot b/SOL005/NSDManagement-API/NSDescriptors.robot index 65ca84e6..2cbbf9dc 100644 --- a/SOL005/NSDManagement-API/NSDescriptors.robot +++ b/SOL005/NSDManagement-API/NSDescriptors.robot @@ -13,7 +13,7 @@ GET all Network Service Descriptors Information [Documentation] Test ID: 5.3.1.1.1 ... Test title: GET all Network Service Descriptors Information ... Test objective: The objective is to test the retrieval of all the Network Service Descriptors information and perform a JSON schema and content validation of the collected data structure - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -26,7 +26,7 @@ GET Network Service Descriptors Information with attribute-based filter [Documentation] Test ID: 5.3.1.1.2 ... Test title: GET Network Service Descriptors Information with attribute-based filter ... Test objective: The objective is to test the retrieval of Network Service Descriptors information using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filter - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -40,7 +40,7 @@ GET Network Service Descriptors Information with invalid attribute-based filter [Documentation] Test ID: 5.3.1.1.3 ... Test title: GET Network Service Descriptors Information with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of Network Service Descriptors information fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -53,7 +53,7 @@ Get all Network Service Descriptors Information with malformed authorization tok [Documentation] Test ID: 5.3.1.1.4 ... Test title: Get all Network Service Descriptors Information with malformed authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using malformed authorization token - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. @@ -65,7 +65,7 @@ Get all Network Service Descriptors Information without authorization token [Documentation] Test ID: 5.3.1.1.5 ... Test title: Get all Network Service Descriptors Information without authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when omitting the authorization token - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. @@ -77,7 +77,7 @@ GET all Network Service Descriptors Information with expired or revoked authoriz [Documentation] Test ID: 5.3.1.1.6 ... Test title: GET all Network Service Descriptors Information with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using expired or revoked authorization token - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.5.3.3, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. @@ -89,7 +89,7 @@ GET all Network Service Descriptors Information with "all_fields" attribute sele [Documentation] Test ID: 5.3.1.1.7 ... Test title: GET all Network Service Descriptors Information with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -103,7 +103,7 @@ GET all Network Service Descriptors Information with "exclude_default" attribute [Documentation] Test ID: 5.3.1.1.8 ... Test title: GET all Network Service Descriptors Information with "exclude_default" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -117,7 +117,7 @@ GET all Network Service Descriptors Information with "fields" attribute selector [Documentation] Test ID: 5.3.1.1.9 ... Test title: GET all Network Service Descriptors Information with "fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "fields" attribute selector @@ -131,7 +131,7 @@ GET all Network Service Descriptors Information with "exclude_fields" attribute [Documentation] Test ID: 5.3.1.1.10 ... Test title: GET all Network Service Descriptors Information with "exclude_fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 4.3.3.2.1, 5.4.2.3.2 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "exclude_fields" attribute selector @@ -160,7 +160,7 @@ PUT all Network Service Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.1.12 ... Test title: PUT all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify Network Service Descriptors Information - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.3 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -172,7 +172,7 @@ PATCH all Network Service Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.1.13 ... Test title: PATCH all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptors Information - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.4 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -184,7 +184,7 @@ DELETE all Network Service Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.1.14 ... Test title: DELETE all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptors Information - ... Pre-conditions: One or more Network Service Descriptors are set in the NFVO. + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. ... Reference: section 5.4.2.3.5 - SOL005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none diff --git a/SOL005/NSDManagement-API/environment/individualSubscription.txt b/SOL005/NSDManagement-API/environment/individualSubscription.txt index 23ed0f47..caf1c582 100644 --- a/SOL005/NSDManagement-API/environment/individualSubscription.txt +++ b/SOL005/NSDManagement-API/environment/individualSubscription.txt @@ -1,3 +1,6 @@ *** Variables *** ${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 ${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${newSubscriptionId} newSubsciptionId +${response} httpresponse +${origResponse} httpresponse diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index 7e103f5b..ff13907c 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -1,6 +1,7 @@ *** Settings *** Resource environment/variables.txt Resource environment/subscriptions.txt +Resource environment/pmJobs.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -11,6 +12,170 @@ Library JSONSchemaLibrary schemas/ Library Process *** Keywords *** +GET all NS Performance Monitoring Jobs + Log Trying to get all PM Jobs present in the NFVO + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with attribute-based filter + Log Trying to get all PM Jobs present in the NFVO, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with all_fields attribute selector + Log Trying to get all PM Jobs present in the NFVO, using 'all_fields' filter + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with exclude_default attribute selector + Log Trying to get all NS Packages present in the NFVO, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with include attribute selector + Log Trying to get all NS Packages present in the NFVO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?include=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with exclude attribute selector + Log Trying to get all NS Packages present in the NFVO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with invalid attribute-based filter + Log Trying to get all PM Jobs present in the NFVO, using an erroneous filter param + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with invalid resource endpoint + 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}/pm_job # wrong URI /pm_job instead of /pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request Create new NS Performance Monitoring Job + Log Creating a new PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/CreatePmJobRequest.json + POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for all NS Performance Monitoring Jobs + 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}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for all NS Performance Monitoring Jobs + 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}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for all NS Performance Monitoring Jobs + 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}"} + PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition NS Performance Monitoring Jobs Exist + Log Checking that Pm Job still exists + GET all NS Performance Monitoring Jobs + +Check Postcondition PmJob Exists + Log Checking that Pm Job exists + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJob + +Check HTTP Response Body PmJobs Matches the requested exclude selector + Log Checking that reports element is missing + ${reports}= Get Value From Json ${response['body']} $..reports + Should Be Empty ${reports} + Log Checking that reports element is missing + ${criteria}= Get Value From Json ${response['body']} $..criteria + Should Be Empty ${criteria} + Log Reports element is empty as expected + +Check HTTP Response Body PmJobs Matches the requested include selector + Log Trying to validate criteria schema + ${criteria}= Get Value From Json ${response['body']} $..criteria + Validate Json criteria.schema.json ${criteria[0]} + Log Validation for criteria schema OK + Log Trying to validate criteria schema + ${reports}= Get Value From Json ${response['body']} $..reports + Validate Json reports.schema.json ${reports[0]} + Log Validation for reports schema OK + +Check HTTP Response Body PmJobs Matches the requested exclude_default selector + Log Checking that reports element is missing + ${reports}= Get Value From Json ${response['body']} $..reports + Should Be Empty ${reports} + Log Reports element is empty as expected + +Check HTTP Response Body PmJobs Matches the requested all_fields selector + Log Trying to validate criteria schema + ${criteria}= Get Value From Json ${response['body']} $..criteria + Validate Json criteria.schema.json ${criteria[0]} + Log Validation for criteria schema OK + Log Trying to validate criteria schema + ${reports}= Get Value From Json ${response['body']} $..reports + Validate Json reports.schema.json ${reports[0]} + Log Validation for reports schema OK + Log Validating _links schema + ${links}= Get Value From Json ${response['body']} $.._links + Validate Json links.schema.json ${links[0]} + Log Validation for _links schema OK + +Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter + Log Checking that attribute-based filter is matched + #todo + +Check HTTP Response Body PmJobs Do Not Contain reports + Log Checking that field element is missing + ${reports}= Get Value From Json ${response['body']} $..reports + Should Be Empty ${reports} + Log Reports element is empty as expected + + Get all NSD Performance Subscriptions [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. @@ -153,7 +318,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Log Check Response includes VNF Package Management according to filter + Log Check Response includes NS Package Management according to filter #TODO diff --git a/SOL005/NSPerformanceManagement-API/PMJobs.robot b/SOL005/NSPerformanceManagement-API/PMJobs.robot index dd2d35e2..98d60bf8 100644 --- a/SOL005/NSPerformanceManagement-API/PMJobs.robot +++ b/SOL005/NSPerformanceManagement-API/PMJobs.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library OperatingSystem Resource environment/pmJobs.txt @@ -8,189 +9,162 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library MockServerLibrary *** Test Cases *** -GET all Pm Jobs - Log Trying to get all PM Jobs present in the VNFM - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs - 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 PmJobs.schema.json ${result} - Log Validation OK - Log Checking that reports element is missing - ${reports}= Get Value From Json ${result} $..reports - Should Be Empty ${reports} - Log Reports element is empty as expected +GET all NS Performance Monitoring Jobs + [Documentation] Test ID: 5.3.4.1.1 + ... Test title: GET all NS Performance Monitoring Jobs + ... Test objective: The objective is to test the retrieval of all the available NS performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET all NS Performance Monitoring Jobs + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Do Not Contain reports -GET all Pm Jobs - Filter - Log Trying to get all PM Jobs present in the VNFM, using filter params - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} - 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 PmJobs.schema.json ${result} - Log Validation OK +GET NS Performance Monitoring Jobs with attribute-based filter + [Documentation] Test ID: 5.3.4.1.2 + ... Test title: GET all NS Performance Monitoring Jobs with attribute-based filter + ... Test objective: The objective is to test the retrieval of NS performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with attribute-based filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested attribute-based filter -GET all Pm Jobs - all_fields - Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_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 PmJobs.schema.json ${result} - Log Validation OK - Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${result} $..criteria - Validate Json criteria.schema.json ${criteria[0]} - Log Validation for criteria schema OK - Log Trying to validate criteria schema - ${reports}= Get Value From Json ${result} $..reports - Validate Json reports.schema.json ${reports[0]} - Log Validation for reports schema OK - Log Validating _links schema - ${links}= Get Value From Json ${result} $.._links - Validate Json links.schema.json ${links[0]} - Log Validation for _links schema OK +GET all NS Performance Monitoring Jobs with "all_fields" attribute selector + [Documentation] Test ID: 5.3.4.1.3 + ... Test title: GET all NS Performance Monitoring Jobs with "all_fields" attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "all_fields" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "all_fileds" selector + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 4.3.3.2.1, 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with all_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested all_fields selector -GET all Pm Jobs - exclude_default - Log Trying to get all VNF Packages present in the VNFM, using filter params - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default - 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 PmJobs.schema.json ${result} - Log Validation OK - Log Checking that reports element is missing - ${reports}= Get Value From Json ${result} $..reports - Should Be Empty ${reports} - Log Reports element is empty as expected +GET all NS Performance Monitoring Jobs with "exclude_default" attribute selector + [Documentation] Test ID: 5.3.4.1.4 + ... Test title: GET all NS Performance Monitoring Jobs with "exclude_default" attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "exclude_default" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "exclude_default" selector + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 4.3.3.2.1, 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested exclude_default selector -GET all Pm Jobs - fields - Log Trying to get all VNF Packages present in the VNFM, using filter params - Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${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 PmJobs.schema.json ${result} - Log Validation OK - Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${result} $..criteria - Validate Json criteria.schema.json ${criteria[0]} - Log Validation for criteria schema OK - Log Trying to validate criteria schema - ${reports}= Get Value From Json ${result} $..reports - Validate Json reports.schema.json ${reports[0]} - Log Validation for reports schema OK +GET all NS Performance Monitoring Jobs with "include" attribute selector + [Documentation] Test ID: 5.3.4.1.5 + ... Test title: GET all NS Performance Monitoring Jobs with "include" attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "include" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "include" selector + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 4.3.3.2.1, 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the use of "include" attribute selector + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with include attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested include selector -GET all Pm Jobs - exclude_fields - Log Trying to get all VNF Packages present in the VNFM, using filter params - Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${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 PmJobs.schema.json ${result} - Log Validation OK - Log Checking that reports element is missing - ${reports}= Get Value From Json ${result} $..reports - Should Be Empty ${reports} - Log Reports element is empty as expected - Log Checking that criteria element is missing - ${criteria}= Get Value From Json ${result} $..criteria - Should Be Empty ${criteria} - Log Criteria element is empty as expected +GET all NS Performance Monitoring Jobs with "exclude" attribute selector + [Documentation] Test ID: 5.3.4.1.6 + ... Test title: GET all NS Performance Monitoring Jobs with exclude_fields attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "exclude" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "exclude" selector + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 4.3.3.2.1, 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the use of "exclude" attribute selector + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with exclude attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested exclude selector -GET all Pm Jobs - Negative (wronge filter name) - Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} - Integer response status 400 - Log Received 400 Bad Request as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate ProblemDetails - ${problemDetails}= Output response headers Content-Type - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET NS Performance Monitoring Jobs with invalid attribute-based filter + [Documentation] Test ID: 5.3.4.1.7 + ... Test title: GET NS Performance Monitoring Jobs with invalid attribute-based filter + ... Test objective: The objective is to test that the retrieval of NS performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with invalid attribute-based filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails -GET all Pm Jobs (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}/pm_job # wrong URI /pm_job instead of /pm_jobs - 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 headers Content-Type - Validate Json ProblemDetails.schema.json ${problemDetails} - Log Validation OK +GET NS Performance Monitoring Jobs with invalid resource endpoint + [Documentation] Test ID: 5.3.4.1.8 + ... Test title: GET NS Performance Monitoring Jobs with invalid resource endpoint + ... Test objective: The objective is to test that the retrieval of NS performance monitoring jobs fails when using invalid resource endpoint + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.2 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with invalid resource endpoint + Check HTTP Response Status Code Is 404 -POST all PM Jobs - Create new PM Job - Log Creating a new PM Job - Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} - Integer response status 201 - Log Received 201 Created as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} ${CONTENT_TYPE_JSON} - Log Trying to validate response - ${result}= Output response body - Validate Json PmJob.schema.json ${result} - Log Validation OK +Create new NS Performance Monitoring Job + [Documentation] Test ID: 5.3.4.1.9 + ... Test title: Create a new NS Performance Monitoring Job + ... Test objective: The objective is to test the creation of a new NS performance monitoring job and perform the JSON schema validation of the returned job data structure + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.1 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS Performance Job is successfully created on the NFVO + Send Post Request Create new NS Performance Monitoring Job + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is PmJob + Check Postcondition PmJob Exists -PUT all PM Jobs - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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}/pm_jobs - Integer response status 405 - Log Received 405 Method not implemented as expected - -PATCH all Pm Jobs - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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}/pm_jobs - Integer response status 405 - Log Received 405 Method not implemented as expected - -DELETE all Pm Jobs - (Method not implemented) - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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}/pm_jobs - Integer response status 405 - Log Received 405 Method not implemented as expected +PUT all NS Performance Monitoring Jobs - Method not implemented + [Documentation] Test ID: 5.3.4.1.10 + ... Test title: PUT all NS Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify NS Performance Monitoring Jobs + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.3 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for all NS Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + +PATCH all NS Performance Monitoring Jobs - (Method not implemented) + [Documentation] Test ID: 5.3.4.1.11 + ... Test title: PATCH all NS Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update NS Performance Monitoring Jobs + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.4 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all NS Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + +DELETE all NS Performance Monitoring Jobs - Method not implemented + [Documentation] Test ID: 5.3.4.1.12 + ... Test title: DELETE all NS Performance Monitoring Jobs - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete NS Performance Monitoring Jobs + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: section 7.4.2.3.5 - SOL005 v2.4.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for all NS Performance Monitoring Jobs + Check HTTP Response Status Code Is 405 + Check Postcondition NS Performance Monitoring Jobs Exist -- GitLab