diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot index 2ea7304ff2c960c5b527dbf4251d11d46aa8fec1..720195b44b51b872b8f6de1f95716983cec87592 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualPmJob.robot @@ -7,7 +7,7 @@ POST Individual NFV-MANO Performance Job - Method not implemented ... Test title: POST Individual NFV-MANO Performance Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NFV-MANO Performance Monitoring Job ... Pre-conditions: none - ... Reference: clause 6.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ GET individual NFV-MANO Performance Job ... Test title: Get individual NFV-MANO Performance Job ... Test objective: The objective is to test the retrieval of an individual performance monitoring job and perform a JSON schema validation of the collected job data structure ... Pre-conditions: A NFV-MANO instance is instantiated. - ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,7 @@ GET individual NFV-MANO Performance Job with invalid resource identifier ... Test title: Get individual NFV-MANO Performance Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,7 @@ PUT Individual NFV-MANO Performance Job - Method not implemented ... Test title: PUT Individual NFV-MANO Performance Job - method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NFV-MANO Performance Monitoring Job ... Pre-conditions: none - ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -58,7 +58,7 @@ PATCH Individual NFV-MANO Performance Job ... Test title: PATCH Individual NFV-MANO Performance Job ... Test objective: The objective is to test that PATCH method modify an existing individual NFV-MANO Performance Monitoring Job ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: PM Job resource is modified. @@ -71,7 +71,7 @@ DELETE Individual NFV-MANO Performance Job ... Test title: Delete Individual NFV-MANO Performance Job ... Test objective: The objective is to test the deletion of an individual performance monitoring job ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The NFV-MANO Performance Job is no more available. @@ -84,7 +84,7 @@ DELETE Individual NFV-MANO Performance Job with invalid resource identifier ... Test title: Delete individual NFV-MANO Performance Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual NFV-MANO performance monitoring job fails when using an invalid resource identifier ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -96,7 +96,7 @@ PATCH Individual NFV-MANO Performance Job - Precondition failed ... Test title: PATCH Individual NFV-MANO Performance Job - Precondition failed ... Test objective: The objective is to test that the PATCH method cannot modify an individual NFV-MANO Performance job where the precondition was not met. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: PM Job resource is not modified. @@ -109,10 +109,35 @@ PATCH Individual NFV-MANO Performance Job - Unprocessable content ... Test title: PATCH Individual NFV-MANO Performance Job - Unprocessable content ... Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when a request contains syntactically correct data but the data cannot be processed. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: PM Job resource is not modified. Send Patch request for individual NFV_MANO Performance Job with unprocessable content Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +PATCH Individual NFV-MANO Performance Job with permitted authorization scope + [Documentation] Test ID: 8.3.2.2.10 + ... Test title: PATCH Individual NFV-MANO Performance Job with permitted authorization scope + ... Test objective: The objective is to test that PATCH method with permitted authorization scope modify an existing individual NFV-MANO Performance Monitoring Job + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: PM Job resource is modified. + Send Patch request for individual NFV-MANO Performance Job with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobModifications + +PATCH Individual NFV-MANO Performance Job with not permitted authorization scope + [Documentation] Test ID: 8.3.2.2.11 + ... Test title: PATCH Individual NFV-MANO Performance Job with not permitted authorization scope + ... Test objective: The objective is to test that PATCH method with not permitted authorization scope fails + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: PM Job resource is modified. + Send Patch request for individual NFV-MANO Performance Job with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot index 90b0a7df98fe34c75027723d54621b8d0340870f..08af11fe6e479fe6765d7015a79e4958730bd7fe 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualReport.robot @@ -7,7 +7,7 @@ POST Individual Performance Report - Method not implemented ... Test title: POST Individual Performance Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NFV-MANO performance report within a monitoring job. ... Pre-conditions: none - ... Reference: clause 6.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ Get Individual Performance Report ... Test title: Get Individual Performance Report ... Test objective: The objective is to test the retrieval of an individual performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. - ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,7 @@ Get Individual Performance Report with invalid resource endpoint ... Test title: Get Individual Performance Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual NFV-MANO performance report associated to a monitoring job fails when using an invalid resource endpoint. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. - ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -44,7 +44,7 @@ PUT Individual Performance Report - Method not implemented ... Test title: PUT Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NFV-MANO performance report within a monitoring job. ... Pre-conditions: none - ... Reference: clause 6.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -56,7 +56,7 @@ PATCH Individual Performance Report - Method not implemented ... Test title: PATCH Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NFV-MANO performance report within a monitoring job. ... Pre-conditions: none - ... Reference: clause 6.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -68,10 +68,35 @@ DELETE Individual Performance Report - Method not implemented ... Test title: DELETE Individual Performance Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing NFV-MANO performance report within a monitoring job ... Pre-conditions: none - ... Reference: clause 6.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANOM ... Applicability: none ... Post-Conditions: none Send Delete request for Individual Performance Report Check HTTP Response Status Code Is 405 +Get Individual Performance Report with permitted authorization scope + [Documentation] Test ID: 8.3.2.3.7 + ... Test title: Get Individual Performance Report with permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual performance report associated to a monitoring job with permitted authorization scope + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PerformanceReport + +Get Individual Performance Report with not permitted authorization scope + [Documentation] Test ID: 8.3.2.3.8 + ... Test title: Get Individual Performance Report with not permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual performance report associated to a monitoring job fails with not permitted authorization scope + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance reports are set for a monitoring job. + ... Reference: clause 6.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with not permitted authorization scope + Check HTTP Response Status Code Is 401 + diff --git a/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot index 30d70c9f116045638aec847e5e7d8430076c20e9..ae9cff74ca771c109435e17a3467478e2f1b02c3 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/IndividualThreshold.robot @@ -7,7 +7,7 @@ POST Individual Threshold - Method not implemented ... Test title: POST Individual Threshold - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Performance Threshold ... Pre-conditions: none - ... Reference: clause 6.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ GET Individual Threshold ... Test title: GET Individual Threshold ... Test objective: The objective is to test the retrieval of an individual NFV-MANO performance threshold and perform a JSON schema and content validation of the collected threshold data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,7 @@ GET Individual Threshold with invalid resource identifier ... Test title: GET Individual Threshold with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual performance threshold fails when using an invalid resource identifier ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance jobs are set. - ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -45,7 +45,7 @@ PUT Individual Threshold - Method not implemented ... Test title: PUT Individual Threshold - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing Performance threshold ... Pre-conditions: none - ... Reference: clause 6.5.7.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -57,7 +57,7 @@ PATCH Individual Threshold ... Test title: PATCH Individual Threshold ... Test objective: The objective is to test that PATCH method modify an existing NFV_MANO performance threshold. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Threshold resource is modified. @@ -70,7 +70,7 @@ DELETE Individual Threshold ... Test title: DELETE Individual Threshold ... Test objective: The objective is to test the deletion of an individual performance threshold ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The Performance Threshold is not available anymore in the NFV-MANO @@ -83,7 +83,7 @@ DELETE Individual Threshold with invalid resource identifier ... Test title: DELETE Individual Threshold with invalid resource identifier ... Test objective: The objective is to test the deletion of an individual performance threshold ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -95,7 +95,7 @@ PATCH Individual Threshold - Precondition failed ... Test title: PATCH Individual Threshold - Precondition failed ... Test objective: The objective is to test that the PATCH method cannot modify an individual NFV-MANO threshold where the precondition was not met. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Threshold resource is not modified. @@ -108,10 +108,35 @@ PATCH Individual Threshold - Unprocessable content ... Test title: PATCH Individual Threshold - Unprocessable content ... Test objective: The objective is to test that PATCH method cannot modify an exsisting individual threshold resource when a request contains syntactically correct data but the data cannot be processed. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. - ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Threshold resource is not modified. Send Patch request for individual Performance Threshold with unprocessable content Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +PATCH Individual Threshold with permitted authorization scope + [Documentation] Test ID: 8.3.2.5.10 + ... Test title: PATCH Individual Threshold with permitted authorization scope + ... Test objective: The objective is to test that PATCH method modify an existing NFV_MANO performance threshold with permitted authorization scope. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: Threshold resource is modified. + Send Patch request for individual Performance Threshold with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ThresholdModifications + +PATCH Individual Threshold with not permitted authorization scope + [Documentation] Test ID: 8.3.2.5.11 + ... Test title: PATCH Individual Threshold with not permitted authorization scope + ... Test objective: The objective is to test that PATCH method fails with not permitted authorization scope. + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more performance thresholds are set. + ... Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: Threshold resource is modified. + Send Patch request for individual Performance Threshold with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot b/SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot index e44605fb8dd6866dc3f0f9510c2c10d64d1e6396..ac39e32dbf8462c067eb5ff3f5c6446a97e60c65 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/NFVMANOPMKeywords.robot @@ -10,7 +10,7 @@ Library MockServerLibrary Library Process Library BuiltIn Library Collections - +Library jwt *** Keywords *** GET all NFV-MANO Performance Monitoring Jobs @@ -130,6 +130,36 @@ Send Post Request to create new NFV-MANO Performance Monitoring Job ${output}= Output response Set Suite Variable ${response} ${output} +Send Post Request to create new NFV-MANO Performance Monitoring Job with permitted authorization scope + Log Creating a new PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scopeValue}= Create Dictionary scope=${JOBS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackUri=${callback_uri} + Check GET response from Notification Endpoint + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request to create new NFV-MANO Performance Monitoring Job with not permitted authorization scope + Log Creating a new PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scopeValue}= Create Dictionary scope=${JOBS_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackUri=${callback_uri} + Check GET response from Notification Endpoint + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Send Post Request to create new NFV-MANO Performance Monitoring Job - Unreachable Endpoint Log Creating a new PM Job for unreachable notification endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -280,6 +310,36 @@ Send Patch request for individual NFV-MANO Performance Job ${output}= Output response Set Suite Variable ${response} ${output} +Send Patch request for individual NFV-MANO Performance Job with permitted authorization scope + Log Trying to perform a PATCH on PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${JOBS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Check GET response from Notification Endpoint + ${template}= Get File jsons/PmJobModifications.json + ${body}= Format String ${template} callbackUri=${callback_uri} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Patch request for individual NFV-MANO Performance Job with not permitted authorization scope + Log Trying to perform a PATCH on PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${JOBS_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Check GET response from Notification Endpoint + ${template}= Get File jsons/PmJobModifications.json + ${body}= Format String ${template} callbackUri=${callback_uri} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Send Patch request for individual NFV-MANO Performance Job - Etag mismatch Log Trying to perform a PATCH on PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -348,6 +408,34 @@ Send Post Request Create new Performance Threshold ${output}= Output response Set Suite Variable ${response} ${output} +Send Post Request Create new Performance Threshold with permitted authorization scope + Log Creating a new Threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scopeValue}= Create Dictionary scope=${THRESHOLD_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackUri=${callback_uri} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send Post Request Create new Performance Threshold with not permitted authorization scope + Log Creating a new Threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scopeValue}= Create Dictionary scope=${THRESHOLD_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackUri=${callback_uri} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + Send Post Request Create new Performance Threshold with unreachable notification endpoint Log Creating a new Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":${AUTHORIZATION_TOKEN}"} @@ -463,6 +551,42 @@ Send Patch request for individual Performance Threshold ${output}= Output response Set Suite Variable @{response} ${output} +Send Patch request for individual Performance Threshold with permitted authorization scope + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${THRESHOLD_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Check GET response from Notification Endpoint + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + ${template}= Get File jsons/ThresholdModification.json + ${body}= Format String ${template} callbackUri=${callback_uri} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual Performance Threshold with not permitted authorization scope + Log Trying to PUT threshold + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${THRESHOLD_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Check GET response from Notification Endpoint + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + ${template}= Get File jsons/ThresholdModification.json + ${body}= Format String ${template} callbackUri=${callback_uri} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} + ${output}= Output response + Set Suite Variable @{response} ${output} + Send Patch request for individual Performance Threshold - Etag mismatch Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -551,6 +675,28 @@ Get Individual Performance Report ${output}= Output response Set Suite Variable ${response} ${output} +Get Individual Performance Report with permitted authorization scope + Log Trying to get a performance report present in the NFV-MANOM + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${JOBS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Performance Report with not permitted authorization scope + Log Trying to get a performance report present in the NFV-MANOM + Set Headers {"Accept": "${ACCEPT_JSON}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} + Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -733,3 +879,9 @@ Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri} + +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} + diff --git a/SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot b/SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot index ef00f429d3bec712d8c7babe8d3cf8b1fa73824d..23b5b9ac3cc01256070db4dc35401d9509216957 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/NotificationEndpoint.robot @@ -8,7 +8,7 @@ Performance Information Available Notification ... Test title: Performance Information Available Notification ... Test objective: The objective is to test that Performance Available Notification is delivered with success to the notification consumer ... Pre-conditions: A subscription for performance available notification is available in the NFV-MANO. - ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -21,7 +21,7 @@ Threshold Crossed Notification ... Test title: Threshold Crossed Notification ... Test objective: The objective is to test that Threshold Crossed Notification is delivered with success to the notification consumer ... Pre-conditions: A subscription for threshold crosssed notification is available in the NFV-MANO. - ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOPerformanceManagement-API/Notifications.robot b/SOL009/NFVMANOPerformanceManagement-API/Notifications.robot index 8fb3977a0a9a9e64b8757005c7ba66a22c62bd65..7287db0a9b05ce9e819ba663f7473c80725bdbf4 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/Notifications.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/Notifications.robot @@ -9,7 +9,7 @@ Performance Information Availability Notification ... Test title: Performance Information Availability Notification ... Test objective: The objective is to test the dispatch of Performance Information Availability Notification when new performance information is available in the NFV-MANO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A performance job is created, and a subscription for information availability notifications is available in the NFV-MANO. - ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -22,7 +22,7 @@ Threshold Crossed Notification ... Test title: Threshold Crossed Notification ... Test objective: The objective is to test the dispatch of Threshold Crossed Notification when a previously set performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A performance job is created, and a threshold subscription is available in the NFV-MANO. - ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.10.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot index 1f8f764117820866033e7152323fdce3eb7f7b3c..818f5330e7fe9ccaec39dc2f2cc5b5a4078d30fe 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/PMJobs.robot @@ -7,7 +7,7 @@ POST Create new NFV-MANO Performance Monitoring Job ... Test title: POST Create a new NFV-MANO Performance Monitoring Job ... Test objective: The objective is to test the creation of a new NFV-MANO performance monitoring job and perform the JSON schema validation of the returned job data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO @@ -21,7 +21,7 @@ GET all NFV-MANO Performance Monitoring Jobs ... Test title: GET all NFV-MANO Performance Monitoring Jobs ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance monitoring jobs and perform a JSON schema validation ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -34,7 +34,7 @@ GET NFV-MANO Performance Monitoring Jobs with attribute-based filter ... Test title: GET all NFV-MANO Performance Monitoring Jobs with attribute-based filter ... Test objective: The objective is to test the retrieval of NFV-MANO performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -47,7 +47,7 @@ GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector ... Test title: GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -60,7 +60,7 @@ GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute sele ... Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -73,7 +73,7 @@ GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector ... Test title: GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO supports the use of fields attribute selector ... Post-Conditions: none @@ -86,7 +86,7 @@ GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selec ... Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -99,7 +99,7 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter ... Test title: GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of NFV-MANO 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 NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -112,7 +112,7 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector ... Test title: GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails with invalid attribute selector ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -125,7 +125,7 @@ GET information about multiple Performance Monitoring Jobs to get Paged Response ... Test title: GET information about multiple Performance Monitoring Jobs to get Paged Response ... Test objective: The objective is to retrieve information about the performance monitoring jobs to get paged response ... Pre-conditions: none - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -138,7 +138,7 @@ GET information about multiple Performance Monitoring Jobs for Bad Request Respo ... Test title: GET information about multiple Performance Monitoring Jobs for Bad Request Response too big ... Test objective: The objective is to test that GET method fail retrieving status information about performance monitoring jobs when Response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: none - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -151,7 +151,7 @@ GET information about multiple Performance Monitoring Jobs with "fields" and "ex ... Test title: GET all NFV-MANO Performance Monitoring Jobs with "fields" and "exclude_default" attribute selector ... Test objective: The objective is to retrieve all performance monitoring jobs with fields and exclude default attribute selector, and perform the JSON schema validation of the HTTP response. ... Pre-conditions: none - ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 5.5.8.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -164,7 +164,7 @@ Get information about multiple Performance Monitoring Jobs with malformed author ... Test title: Get information about multiple Performance Monitoring Jobs with malformed authorization token ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when using malformed authorization token ... Pre-conditions: none - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -176,7 +176,7 @@ Get information about multiple Performance Monitoring Jobs without authorization ... Test title: Get information about multiple Performance Monitoring Jobs without authorization token ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when omitting the authorization token ... Pre-conditions: none - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -188,7 +188,7 @@ GET information about multiple Performance Monitoring Jobs with expired or revok ... Test title: GET information about multiple Performance Monitoring Jobs with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of information about Performance Monitoring Jobs fails when using expired or revoked authorization token ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -200,7 +200,7 @@ PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented ... Test title: PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: clause 6.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -212,7 +212,7 @@ PATCH all NFV-MANO Performance Monitoring Jobs - (Method not implemented) ... Test title: PATCH all NFV-MANO Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update NFV-MANO Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: clause 6.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -224,7 +224,7 @@ DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented ... Test title: DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: clause 6.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -236,10 +236,36 @@ POST Create new NFV-MANO Performance Monitoring Job - Unreachable Notification E ... Test title: POST Create a new NFV-MANO Performance Monitoring Job ... Test objective: The objective is to test that a new NFV_MANO Performance Monitoring Job is not created if the notification endpoint is unreachable by the NFV-MANO. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. - ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Notification endpoint is unreachable by the NFV-MANO. ... Post-Conditions: none Send Post Request to create new NFV-MANO Performance Monitoring Job - Unreachable Endpoint Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create new NFV-MANO Performance Monitoring Job with permitted authorization scope + [Documentation] Test ID: 8.3.2.1.20 + ... Test title: POST Create a new NFV-MANO Performance Monitoring Job with permitted authorization scope + ... Test objective: The objective is to test the creation of a new NFV-MANO performance monitoring job with permitted authorization scope + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO + Send Post Request to create new NFV-MANO Performance Monitoring Job with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is PmJob + Check Postcondition PmJob Exists + +POST Create new NFV-MANO Performance Monitoring Job with not permitted authorization scope + [Documentation] Test ID: 8.3.2.1.21 + ... Test title: POST Create a new NFV-MANO Performance Monitoring Job with not permitted authorization scope + ... Test objective: The objective is to test that the creation of a new NFV-MANO performance monitoring job fails with not permitted authorization scope + ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO. + ... Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO + Send Post Request to create new NFV-MANO Performance Monitoring Job with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot index b5777f265eb152d227c830b2f50764caf23614c8..24a6970262e89dffd979c58476b11288550ede93 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot +++ b/SOL009/NFVMANOPerformanceManagement-API/Thresholds.robot @@ -7,7 +7,7 @@ POST Create new Performance Threshold ... Test title: POST Create new Performance Threshold ... Test objective: The objective is to test the creation of a new NFV-MANO performance threshold and perform the JSON schema validation of the returned threshold data structure. ... Pre-conditions: A NFV-MANO instance is instantiated. - ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The NFV-MANO Performance Threshold is successfully created on the NFV-MANO @@ -22,7 +22,7 @@ GET All Performance Thresholds ... Test title: GET All Performance Thresholds ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance thresholds and perform a JSON schema validation of the collected thresholds data structure. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. - ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -35,7 +35,7 @@ GET Performance Thresholds with attribute-based filter ... Test title: GET Performance Thresholds with attribute-based filter ... Test objective: The objective is to test the retrieval of all the available NFV-MANO performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set in the NFV-MANO. - ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -49,7 +49,7 @@ GET Performance Threshold with Paged Response ... Test title: GET Performance Threshold with Paged Response ... Test objective: The objective is to query information about NFV-MANO Performance Thresholds to get Paged Response. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. - ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ GET Performance Thresholds - Invalid attribute-based filter ... Test title: GET Performance Thresholds - Invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of NFV-MANO performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. - ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -75,7 +75,7 @@ GET Performance Threshold - Bad Request Response too Big ... Test title: GET Performance Threshold - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of NFV-MANO performance thresholds fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance thresholds are set. - ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -88,7 +88,7 @@ PUT Performance Thresholds - Method not implemented ... Test title: PUT Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Thresholds ... Pre-conditions: none - ... Reference: clause 6.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -100,7 +100,7 @@ PATCH Performance Thresholds - Method not implemented ... Test title: PATCH Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify NFV-MANO Performance Thresholds ... Pre-conditions: none - ... Reference: clause 6.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -112,7 +112,7 @@ DELETE Performance Thresholds - Method not implemented ... Test title: DELETE Performance Thresholds - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Thresholds ... Pre-conditions: none - ... Reference: clause 6.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -125,10 +125,37 @@ POST Create new Performance Threshold - Unprocessable content ... Test objective: The objective is to test the creation of a new NFV-MANO performance threshold and perform the JSON schema validation of the returned threshold data structure. ... Test objective: The objective is to test that a new NFV-MANO performance threshold is not created if the notification endpoint is unreachable by the NFV-MANO. ... Pre-conditions: A NFV-MANO instance is instantiated. - ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Notification endpoint is unreachable by the NFV-MANO. ... Post-Conditions: none Send Post Request Create new Performance Threshold with unreachable notification endpoint Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create new Performance Threshold with permitted authorization scope + [Documentation] Test ID: 8.3.2.4.11 + ... Test title: POST Create new Performance Threshold with permitted authorization scope + ... Test objective: The objective is to test the creation of a new NFV-MANO performance threshold with permitted authorization scope. + ... Pre-conditions: A NFV-MANO instance is instantiated. + ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Threshold is successfully created on the NFV-MANO + Send Post Request Create new Performance Threshold with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Header Contains Location + Check Postcondition Threshold Exists + +POST Create new Performance Threshold with not permitted authorization scope + [Documentation] Test ID: 8.3.2.4.12 + ... Test title: POST Create new Performance Threshold with not permitted authorization scope + ... Test objective: The objective is to test the creation of a new NFV-MANO performance threshold fails with not permitted authorization scope. + ... Pre-conditions: A NFV-MANO instance is instantiated. + ... Reference: clause 6.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: The NFV-MANO Performance Threshold is successfully created on the NFV-MANO + Send Post Request Create new Performance Threshold with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt index bc36f6f1c21fd462ef6dd74d47d63bb8ec6b5195..c58fdd8ced044f1bb1c30599d4e465c2ba52aa52 100644 --- a/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOPerformanceManagement-API/environment/variables.txt @@ -9,6 +9,14 @@ ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken ${BAD_AUTHORIZATION_TOKEN} Bear sometoken +${OAUTH_ENCRIPTION_ALGORITHM} HS256 +${JOBS_PERMITTED_SCOPE} nfvmanopm:v2:pm_job_info +${JOBS_NOT_PERMITTED_SCOPE} nfvmanopm:v2:pm_job_info:readonly +${THREHSOLD_PERMITTED_SCOPE} nfvmanopm:v2:thresold_info +${THRESHOLD_NOT_PERMITTED_SCOPE} nfvmanopm:v2:threshold_info:readonly +${NOT_PERMITTED_SCOPE} nfvmanopm:v2:invalid + + ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT_JSON} application/json