diff --git a/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot b/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot index 8ddfedb7fdeef71313713fbee932a44d80345800..40505fdc8c2bfa71990d1161c23f2a0930a808d1 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualLoggingJob.robot @@ -50,7 +50,7 @@ PUT Individual Logging Job - Method not implemented [Documentation] Test ID: 8.3.4.2.4 ... Test title: PUT Individual Logging Job - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing Logging Job - ... Pre-conditions: Logging Job is already created. + ... Pre-conditions: none ... Reference: clause 8.5.4.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -62,7 +62,7 @@ PATCH Individual Logging Job - Method not implemented [Documentation] Test ID: 8.3.4.2.5 ... Test title: PATCH Individual Logging Job - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new Logging Job - ... Pre-conditions: Logging Job is already created. + ... Pre-conditions: none ... Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -94,4 +94,4 @@ DELETE Individual Logging Job with invalid resource identifier ... Post-Conditions: none Send Delete request for individual Logging Job with invalid resource identifier Check HTTP Response Status Code Is 404 - Check HTTP Response Body Json Schema Is ProblemDetails + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/IndividualReport.robot b/SOL009/NFVMANOLogManagement-API/IndividualReport.robot index a285b15696f9809e7e1f2c9aa26b22f2e62da912..d96270ac487e2cefc2cf523dfcb22d8c98615e30 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualReport.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualReport.robot @@ -11,7 +11,7 @@ POST Individual Log Report - Method not implemented [Documentation] Test ID: 8.3.4.3.1 ... Test title: POST Individual Log Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new log report. - ... Pre-conditions: Logging Job is already created. + ... Pre-conditions: none ... Reference: clause 8.5.5.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -61,7 +61,7 @@ PUT Individual Log Report - Method not implemented [Documentation] Test ID: 8.3.4.3.5 ... Test title: PUT Individual Log Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing log report. - ... Pre-conditions: One or more log reports are set. + ... Pre-conditions: none ... Reference: clause 8.5.5.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -73,7 +73,7 @@ PATCH Individual Log Report - Method not implemented [Documentation] Test ID: 8.3.4.3.6 ... Test title: PATCH Individual Log Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existinglog report. - ... Pre-conditions: One or more log reports are set. + ... Pre-conditions: none ... Reference: clause 8.5.5.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -85,7 +85,7 @@ DELETE Individual Log Report - Method not implemented [Documentation] Test ID: 8.3.4.3.7 ... Test title: DELETE Individual Log Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing log report. - ... Pre-conditions: One or more log reports are set. + ... Pre-conditions: none ... Reference: clause 8.5.5.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none diff --git a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot index 444831faa240a0507213bab81ba4716ea1184f6c..cbc6a21531b0848339f2fa65170eed3fba8d84ea 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot @@ -62,7 +62,7 @@ POST Individual Subscription - Method not implemented [Documentation] Test ID: 8.3.4.6.5 ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Subscription - ... Pre-conditions: + ... Pre-conditions: none ... Reference: clause 8.5.8.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -74,7 +74,7 @@ PUT Individual Subscription - Method not implemented [Documentation] Test ID: 8.3.4.6.6 ... Test title: PUT Individual Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing subscription - ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Pre-conditions: none ... Reference: clause 8.5.8.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -86,7 +86,7 @@ PATCH Individual Subscription - Method not implemented [Documentation] Test ID: 8.3.4.6.7 ... Test title: PATCH Individual Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing subscription - ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Pre-conditions: none ... Reference: clause 8.5.8.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none diff --git a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot index 38d15c94be64ef55077ec19771791a18b0eb245f..c72f4b107731936076109c48c04ee8b1eb20a537 100644 --- a/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot +++ b/SOL009/NFVMANOLogManagement-API/LoggingJobs.robot @@ -77,7 +77,7 @@ GET Logging jobs - Bad Request Response too Big GET information about logging jobs with attribute-based filter [Documentation] Test ID: 8.3.4.1.6 ... Test title: GET information about logging jobs with attribute-based filter - ... Test objective: The objective is to retrieve information about the logging jobs with attribute filters + ... Test objective: The objective is to retrieve information about the logging jobs with attribute filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO @@ -90,7 +90,7 @@ GET information about logging jobs with attribute-based filter GET information about logging jobs with "all_fields" attribute selector [Documentation] Test ID: 8.3.4.1.7 ... Test title: GET information about logging jobs with "all_fields" attribute selector - ... Test objective: The objective is to retrieve information about logging jobs with "all_fields" attribute selector + ... Test objective: The objective is to retrieve information about logging jobs with "all_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO @@ -103,7 +103,7 @@ GET information about logging jobs with "all_fields" attribute selector GET information about Logging Jobs with "exclude_default" attribute selector [Documentation] Test ID: 8.3.4.1.8 ... Test title: GET information about Logging Jobs with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve information about logging jobs with "exclude_default" attribute selector + ... Test objective: The objective is to retrieve information about logging jobs with "exclude_default" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO @@ -117,7 +117,7 @@ GET information about Logging Jobs with "exclude_default" attribute selector GET information about Logging Jobs with "fields" attribute selector [Documentation] Test ID: 8.3.4.1.9 ... Test title: GET information about Logging Jobs with fields attribute selector - ... Test objective: The objective is to retrieve information about Logging Jobs with fields attribute selector + ... Test objective: The objective is to retrieve information about Logging Jobs with fields attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO @@ -130,7 +130,7 @@ GET information about Logging Jobs with "fields" attribute selector GET information about Logging Jobs with "exclude_fields" attribute selector [Documentation] Test ID: 8.3.4.1.10 ... Test title: GET information about Logging Jobs with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve information about the Logging Jobs with "exclude_fields" attribute selector + ... Test objective: The objective is to retrieve information about the Logging Jobs with "exclude_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one logging job is created. ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO @@ -140,8 +140,21 @@ GET information about Logging Jobs with "exclude_fields" attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is LoggingJobs -GET information about Logging Jobs with Paged Response +GET information about Logging Jobs with "fields" and "exclude_default" attribute selector [Documentation] Test ID: 8.3.4.1.11 + ... Test title: GET information about Logging Jobs with fields and exclude_default attribute selector + ... Test objective: The objective is to retrieve information about Logging Jobs with fields and exclude_default attribute selector, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: At least one logging job is created. + ... Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Logging Jobs with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LoggingJobs + +GET information about Logging Jobs with Paged Response + [Documentation] Test ID: 8.3.4.1.12 ... Test title: GET information about Logging Jobs with Paged Response ... Test objective: The objective is to query information about Logging Jobs to get Paged Response. ... Pre-conditions: At least one logging job is created. @@ -154,10 +167,10 @@ GET information about Logging Jobs with Paged Response Check HTTP Response Header Contains Link PUT Logging Jobs - Method not implemented - [Documentation] Test ID: 8.3.4.1.12 + [Documentation] Test ID: 8.3.4.1.13 ... Test title: PUT Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: + ... Pre-conditions: none ... Reference: clause 8.5.3.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -166,7 +179,7 @@ PUT Logging Jobs - Method not implemented Check HTTP Response Status Code Is 405 PATCH Logging Jobs - Method not implemented - [Documentation] Test ID: 8.3.4.1.13 + [Documentation] Test ID: 8.3.4.1.14 ... Test title: PATCH Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none @@ -178,7 +191,7 @@ PATCH Logging Jobs - Method not implemented Check HTTP Response Status Code Is 405 DELETE Logging Jobs - Method not implemented - [Documentation] Test ID: 8.3.4.1.14 + [Documentation] Test ID: 8.3.4.1.15 ... Test title: DELETE Logging Jobs - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none @@ -187,4 +200,4 @@ DELETE Logging Jobs - Method not implemented ... Applicability: none ... Post-Conditions: none DELETE Logging Jobs - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot index 9eb34dba4f2c6166707a23d715863017da1e9078..d2cc5cae0a637d1349f57e7a3b58cf5781bcbcb8 100644 --- a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot +++ b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot @@ -1,5 +1,6 @@ *** Settings *** -Resource environment/variables.txt +Library String +Resource environment/variables.txt Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -100,6 +101,14 @@ GET Logging Jobs with fields attribute selector ${output}= Output response Set Suite Variable ${response} ${output} +GET Logging Jobs with fields and exclude_default attribute selector + Log Queries information about Logging Jobs, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs?exclude_default&fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + GET Logging Jobs with exclude_fields attribute selector Log Query NFV-MANO The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -261,7 +270,8 @@ Send Log data Request in Synchronous mode Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/compileLogRequest.json + ${template}= Get File jsons/compileLogRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log ${body} ${body}= Output response Set Suite Variable &{response} ${body} @@ -276,7 +286,8 @@ Send Log data Request in Asynchronous mode Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/compileLogRequest.json + ${template}= Get File jsons/compileLogRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log ${body} ${body}= Output response Set Suite Variable &{response} ${body} @@ -299,7 +310,8 @@ Send Log data Request Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/createLoggingJobRequest.json + ${template}= Get File jsons/createLoggingJobRequest.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} Post ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log ${body} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} @@ -351,7 +363,6 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} - Get all Subscriptions [Documentation] The api consumer can use this method to query the list of active subscriptions to log management notifications Set headers {"Accept": "application/json"} @@ -381,14 +392,16 @@ Send Post Request for Subscription Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body LogmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -404,8 +417,9 @@ Send Post Request for Duplicated Subscription Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot index c9f2350fffb1fd841a9025016e404bd3cb84fc1f..bc85a54c7aa9770cbd8890ccbb56f4bedd81bb68 100644 --- a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot @@ -140,7 +140,7 @@ PUT Subscriptions - Method not implemented [Documentation] Test ID 8.3.4.5.10 ... Test title: PUT Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify subscriptions - ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Pre-conditions: none ... Reference: clause 8.5.7.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -152,7 +152,7 @@ PATCH Subscriptions - Method not implemented [Documentation] Test ID 8.3.4.5.11 ... Test title: PATCH Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update subscriptions - ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Pre-conditions: none ... Reference: clause 8.5.7.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -164,7 +164,7 @@ DELETE Subscriptions - Method not implemented [Documentation] Test ID 8.3.4.5.12 ... Test title: DELETE Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete subscriptions - ... Pre-conditions: At least one subscription is available in the NFV-MANO. + ... Pre-conditions: none ... Reference: clause 8.5.7.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none diff --git a/SOL009/NFVMANOLogManagement-API/environment/variables.txt b/SOL009/NFVMANOLogManagement-API/environment/variables.txt index 5bdb72512eb13c1e93e6e9c2f0f20be06cc870a1..aff90b476deaa5799d6cca531773e09fe22d0139 100644 --- a/SOL009/NFVMANOLogManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOLogManagement-API/environment/variables.txt @@ -59,4 +59,6 @@ ${polling} 10 sec ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId \ No newline at end of file +${newSubscriptionId} newSubsciptionId + +${objectInstanceId} 4bd7-94b4-6bbb86-9c79aa \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/jsons/compileLogRequest.json b/SOL009/NFVMANOLogManagement-API/jsons/compileLogRequest.json index 2d3240611d2b7dda00c6ca20b2b3552b2d3e90f7..526c6caa21166b321f6f3ffd652f48d640081021 100644 --- a/SOL009/NFVMANOLogManagement-API/jsons/compileLogRequest.json +++ b/SOL009/NFVMANOLogManagement-API/jsons/compileLogRequest.json @@ -1,3 +1,3 @@ -{ - "objectInstanceId":"" -} \ No newline at end of file +{{ + "objectInstanceId":"{objectInstanceId}" +}} \ No newline at end of file diff --git a/SOL009/NFVMANOLogManagement-API/jsons/createLoggingJobRequest.json b/SOL009/NFVMANOLogManagement-API/jsons/createLoggingJobRequest.json index a7d36a3e9fa8c26ab40d880f85fbfea20a1f5542..ec6656b6fd5587478cc51a3177e351141fbe0aaa 100644 --- a/SOL009/NFVMANOLogManagement-API/jsons/createLoggingJobRequest.json +++ b/SOL009/NFVMANOLogManagement-API/jsons/createLoggingJobRequest.json @@ -1,6 +1,8 @@ -{ - "objectInstanceIds":[], - "jobCriteria":{ +{{ + "objectInstanceIds":[ + "{objectInstanceId}" + ], + "jobCriteria":{{ "loggingType":"MESSAGES" - } -} + }} +}} diff --git a/SOL009/NFVMANOLogManagement-API/jsons/subscriptions.json b/SOL009/NFVMANOLogManagement-API/jsons/subscriptions.json index 3fcc4e59bcbcc09b0e5355a1557d439378f1520b..b81c74461d233994167551fd344d2b2a30f9f4df 100644 --- a/SOL009/NFVMANOLogManagement-API/jsons/subscriptions.json +++ b/SOL009/NFVMANOLogManagement-API/jsons/subscriptions.json @@ -1,5 +1,5 @@ { - "callbackUri": "http://127.0.0.1/subscribe", + "callbackUri": "{callback_uri}{callback_endpoint}", "filter": { "notificationTypes": ["ThresholdCrossedNotification"] }