diff --git a/.gitignore b/.gitignore index a40199d342c5986c89ce93910b37b8e41e9d7221..3667399cac58417a91fe9ff25bff5152a3aea32e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /red.xml build/ dist/ +/libspecs/ diff --git a/LICENSE b/LICENSE index c7a6ba06afc8440ff3742ee50286ada519c15dec..b10b838c766e4e4198eb866e2b9d3eecc98423e0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2019 ETSI +Copyright 2019-2020 ETSI Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index e336da33e32632a7dad6bb4c6d8851ed70bb9a18..2792b099e8ee23e8911446038c643ca812cc54e4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # NFV API Conformance Test Specification (NFV-TST 010) This repository hosts the NFV API Conformance test specification for -the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.04.01_60/gs_NFV-SOL002v020401p.pdf), [SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf), [SOL005](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf), in their versions v2.4.1. +the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.04.01_60/gs_NFV-SOL002v020401p.pdf), [SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.04.01_60/gs_NFV-SOL003v020401p.pdf), [SOL005](http://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.04.01_60/gs_NFV-SOL005v020401p.pdf), in their versions v2.6.1. -More information and download is available at [DGS/NFV-TST010](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=54031). +More information and download is available at [DGS/NFV-TST010ed261](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=58428). + +**{- Disclaimer: The content of this repository is related to a DRAFT, i.e. a working document, of ETSI ISG NFV.-}** + +{-It is provided for information only and is still under development. The content may be updated, replaced, or removed at any time. Do not use as reference material.-} + +The latest draft may be downloaded at the [ISG NFV open area](https://docbox.etsi.org/isg/nfv/open/Drafts/). ## Overview diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index d032b05fb69d2f3321f98911133a243f17176842..2245d3b04607d04714ee6c9da9340898d25a0148 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -37,7 +37,7 @@ GET information about multiple alarms with attribute-based filter ... Test title: GET information about multiple alarms with attribute-based filter ... Test objective: The objective is to retrieve information about the alarm list ... Pre-conditions: - ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -50,73 +50,20 @@ GET information about multiple alarms with invalid attribute-based filter ... Test title: GET information about multiple alarms with invalid attribute-based filter ... Test objective: The objective is to retrieve information about the alarm list ... Pre-conditions: - ... Reference: clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: GET Alarms Task with invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET information about multiple alarms with "all_fields" attribute selector - [Documentation] Test ID: 6.3.4.1.5 - ... Test title: GET information about multiple alarms with "all_fields" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - GET Alarms Task with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - -GET information about multiple alarms with exclude_default attribute selector - [Documentation] Test ID: 6.3.4.1.6 - ... Test title: GET information about multiple alarms with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - GET Alarms Task with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - - -GET information about multiple alarms with fields attribute selector - [Documentation] Test ID: 6.3.4.1.7 - ... Test title: GET information about multiple alarms with fields attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - GET Alarms Task with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - -GET information about multiple alarms with "exclude_fields" attribute selector - [Documentation] Test ID: 6.3.4.1.8 - ... Test title: GET information about multiple alarms with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: none - GET Alarms Task with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms PUT Alarms - Method not implemented [Documentation] Test ID: 6.3.4.1.9 ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: - ... Reference: clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: none @@ -128,7 +75,7 @@ PATCH Alarms - Method not implemented ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: - ... Reference: clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: none @@ -140,7 +87,7 @@ DELETE Alarms - Method not implemented ... Test title: DELETE Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: - ... Reference: clause 7.4.2.3.6 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: the alarm is not deleted diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 6ec24fe08ccbb847ac0e494364b6aaf129386a79..87c44a93b913702b6211e5094c85fa6215dc7af5 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -20,7 +20,7 @@ Escalate the perceived severity GET Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.2 ... Test title: GET Escalate the perceived severity - Method not implemented - ... Test objective: to test that the method is not implemented + ... Test objective: The objective is to test that the GET HTTP method not implemented for escalate perceived severity ... Pre-conditions: ... Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM @@ -32,7 +32,7 @@ GET Escalate the perceived severity - Method not implemented PUT Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.3 ... Test title: PUT Escalate the perceived severity - Method not implemented - ... Test objective: to test that the method is not implemented + ... Test objective: The objective is to test that the PUT HTTP method not implemented for escalate perceived severity ... Pre-conditions: ... Reference: clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM @@ -44,7 +44,7 @@ PUT Escalate the perceived severity - Method not implemented PATCH Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.4 ... Test title: PATCH Escalate the perceived severity - Method not implemented - ... Test objective: to test that the method is not implemented + ... Test objective: The objective is to test that the PATCH HTTP method not implemented for escalate perceived severity ... Pre-conditions: ... Reference: clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM @@ -57,7 +57,7 @@ PATCH Escalate the perceived severity - Method not implemented DELETE Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.5 ... Test title: DELETE Escalate the perceived severity - Method not implemented - ... Test objective: to test that the method is not implemented + ... Test objective: The objective is to test that the DELETE HTTP method not implemented for escalate perceived severity ... Pre-conditions: ... Reference: clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 06d25b5cd627e5ac20b5f0b5985fd7a62733a017..29f26677e57aae180a3f21a3cb4f35c00af7bd43 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -41,9 +41,9 @@ GET information about an individual alarm -PUT Alarm - Method not implemented +PUT Individual Alarm - Method not implemented [Documentation] Test ID: 6.3.4.2.3 - ... Test title: PUT Alarm - Method not implemented + ... Test title: PUT Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: ... Reference: clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -54,9 +54,9 @@ PUT Alarm - Method not implemented Check HTTP Response Status Code Is 405 -PATCH Alarm +PATCH Individual Alarm [Documentation] Test ID: 6.3.4.2.4 - ... Test title: PATCH Alarm + ... Test title: PATCH Individual Alarm ... Test objective: The objective is to Modify an individual alarm resource ... Pre-conditions: The related alarm exists ... Reference: clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -67,10 +67,10 @@ PATCH Alarm Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarmModifications -PATCH Alarm - Precondition failed +PATCH Individual Alarm - Precondition failed [Documentation] Test ID: 6.3.4.2.5 - ... Test title: PATCH Alarm - Precondition failed - ... Test objective: The objective is to Modify an individual alarm resource + ... Test title: PATCH Individual Alarm - Precondition failed + ... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met ... Pre-conditions: The related alarm exists ... Reference: clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM @@ -80,9 +80,9 @@ PATCH Alarm - Precondition failed Check HTTP Response Status Code Is 412 Check HTTP Response Body Json Schema Is ProblemDetails -PATCH Alarm - Conflict +PATCH Individual Alarm - Conflict [Documentation] Test ID: 6.3.4.2.6 - ... Test title: PATCH Alarm - Conflict + ... Test title: PATCH Individual Alarm - Conflict ... Test objective: The objective is to Modify an individual alarm resource ... Pre-conditions: The related alarm exists ... Reference: clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -94,9 +94,9 @@ PATCH Alarm - Conflict Check HTTP Response Body Json Schema Is ProblemDetails -DELETE Alarm - Method not implemented +DELETE Individual Alarm - Method not implemented [Documentation] Test ID: 6.3.4.2.7 - ... Test title: DELETE Alarm - Method not implemented + ... Test title: DELETE Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: ... Reference: clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -184,4 +184,4 @@ Check HTTP Response Body Json Schema Is Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} - Log Json Schema Validation OK \ No newline at end of file + Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index a98869517c2c823e980586228875dce5a96b88bb..650f490892ca8333a1da826e03a6ca8471e8388e 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -68,7 +68,6 @@ DELETE an individual subscription ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: the subscription is deleted - Check resource existence Delete individual subscription Check HTTP Response Status Code Is 204 @@ -139,4 +138,4 @@ Check HTTP Response Body Json Schema Is Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} - Log Json Schema Validation OK \ No newline at end of file + Log Json Schema Validation OK diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 6da4fc3319a8ec3277dbeed4bc7605bee7c54825..b24fc27a1d8386ba8fafb508e0276de7089d0446 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -14,10 +14,11 @@ Create a new subscription ... Reference: clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: - ... Post-Conditions: subscription is created + ... Post-Conditions: Resource created successfully Post Create subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is FmSubscription + Check resource existence Create a new Subscription - DUPLICATION [Documentation] Test ID: 6.3.4.4.2 @@ -82,60 +83,6 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters Get subscriptions - invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET subscriptions with "all_fields" attribute selector - [Documentation] Test ID: 6.3.4.4.8 - ... Test title: GET subscriptions with "all_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_default" attribute selector - [Documentation] Test ID: 6.3.4.4.9 - ... Test title: GET subscriptions with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "fields" attribute selector - [Documentation] Test ID: 6.3.4.4.10 - ... Test title: GET subscriptions with "fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_fields" attribute selector - [Documentation] Test ID: 6.3.4.4.11 - ... Test title: GET subscriptions with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - - PUT subscriptions - Method not implemented [Documentation] Test ID: 6.3.4.4.8 @@ -286,4 +233,11 @@ Check HTTP Response Body Json Schema Is Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} - Log Json Schema Validation OK \ No newline at end of file + Log Json Schema Validation OK + +Check resource existence + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Integer response status 200 + diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 21f4d4ac59ce9e3437f4a31584611d48a725db42..f0c3ed2b77731e785dac00884c8d8715d62cecb0 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -5,7 +5,8 @@ Resource environment/subscriptions.txt Library OperatingSystem Library JSONLibrary Library Process -Library MockServerLibrary +Library MockServerLibrary +Library String Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true @@ -220,9 +221,9 @@ Check Postcondition VNF Indicator Subscription Is Set Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - #todo - - + @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] + Create Sessions Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 92edb2aa050053c0d841c574cd8eb5ade364a823..d4f7aadd52d0b27252f35673f3f293f0108e4bbf 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -3,6 +3,7 @@ Documentation This clause defines all the resources and methods provided by Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary +Library String Resource environment/vnfIndicators.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false @@ -269,4 +270,7 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - #todo \ No newline at end of file + @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} + @{var_name} = Split String @{attr}[0] ,${SEPERATOR} + @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 70bd4ab965d3cdae4f1420329592cb0a6a1449cd..ffc1d081d1143f78703c91a16b017faccefb0d2d 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -4,6 +4,7 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource environment/vnfIndicatorinVnfInstance.txt Library JSONLibrary +Library String Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false *** Test Cases *** @@ -196,12 +197,17 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes Indicators according to resource identifier - #todo + Should Be Equal As Strings ${response['body']['vnfInstanceId']} ${vnfInstanceId} Check HTTP Response Body Matches Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - #todo + @{words} = Split String ${POS_FIELDS} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['name']} @{words}[1] Check Postcondition Indicators for VNF instance Exist - Log Check Response includes VNF Indicators according to filter - #todo + Log Check Postcondition Indicators for VNF instance Exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Should Be Equal ${response.status_code} 200 + diff --git a/SOL002/VNFIndicator-API/environment/subscriptions.txt b/SOL002/VNFIndicator-API/environment/subscriptions.txt index 401b374f6fa4c64f5dbac76b67ed2a7d5f3741d1..ec4b63ac0b029a4352bd6e32d35b625436fed83b 100644 --- a/SOL002/VNFIndicator-API/environment/subscriptions.txt +++ b/SOL002/VNFIndicator-API/environment/subscriptions.txt @@ -7,3 +7,4 @@ ${NEG_FILTER} callback=http://127.0.0.1/subscribe ${response}= httpresponse ${total_polling_time} 2 min ${polling_interval} 10 sec +${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt index 4ebe5488206a095bcb99595e51e9c2f1450b3ac3..8651dee3da6c2b3a4eabfa69879dee2659db881e 100644 --- a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt @@ -4,3 +4,4 @@ ${erroneousVnfInstanceId} erroneousVnfInstanceId ${POS_FIELDS} name=vnfIndicator ${NEG_FIELDS} wrongName=any_value ${response}= httpresponse +${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicators.txt b/SOL002/VNFIndicator-API/environment/vnfIndicators.txt index 8b1a56f48622c75784aabf684a9bbd76a807e97e..8476590796160e3da8b0d6c7e3548b5d74381854 100644 --- a/SOL002/VNFIndicator-API/environment/vnfIndicators.txt +++ b/SOL002/VNFIndicator-API/environment/vnfIndicators.txt @@ -2,4 +2,7 @@ ${POS_FIELDS} name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0 ${NEG_FIELDS} wrongName=wrongValue ${response} some_response_object -${vnfIndicators} +${vnfIndicators} = +${SEPERATOR} = +${VAR_SEPERATOR} & +${POS_FILTER} = \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot index 74e8892460f85c7f5bccb4f64206548bf953cb64..4eab83540ea7080381b65a55b143643dab7ebc95 100644 --- a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -24,7 +24,7 @@ Post Cancel operation task Post Cancel operation task Conflict [Documentation] Test ID: 6.3.5.16.2 - ... Test title: POST Cancel operation task + ... Test title: POST Cancel operation task Conflict ... Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state ... Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state ... Reference: clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 diff --git a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index d4c3ba81907dcec239b32b12ab988f52e4136f63..ce033cae283d9fa6a6830b5216db02f458c4001c 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -75,7 +75,7 @@ PUT Change deployment flavour VNFInstance - Method not implemented PATCH Change deployment flavour VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.6.6 - ... Test title: PATCH Cancel operation task - Method not implemented + ... Test title: PATCH Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 9faeab3c13ddb1016e113693401a32afe52b150c..a632aa101fef928694a643add8923509adc7c205 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -37,7 +37,6 @@ GET Information about an individual VNF Instance GET individual vnfInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstance - SET etag PUT Individual VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.2.3 @@ -68,7 +67,7 @@ PATCH Individual VNFInstance Precondition failed [Documentation] Test ID: 6.3.5.2.5 ... Test title: PATCH Individual VNFInstance Precondition failed ... Test objective: The objective is to create a new VNF instance resource - ... Pre-conditions: A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity + ... Pre-conditions: VNF Instance is Created ... Reference: clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE ... Applicability: @@ -80,7 +79,7 @@ PATCH Individual VNFInstance Precondition failed PATCH Individual VNFInstance Conflict [Documentation] Test ID: 6.3.5.2.6 ... Test title: PATCH Individual VNFInstance Conflict - ... Test objective: The objective is to create a new VNF instance resource + ... Test objective: The objective is to verify that modification operation cannot be executed currently, due to a conflict with the state of the VNF instance resource because another LCM Operation is ongoing. ... Pre-conditions: none ... Reference: clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE @@ -104,8 +103,8 @@ DELETE Individual VNFInstance DELETE Individual VNFInstance Conflict [Documentation] Test ID: 6.3.5.2.8 - ... Test title: DELETE Individual VNFInstance - ... Test objective: The objective is to verify that The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Test title: DELETE Individual VNFInstance Conflict + ... Test objective: The objective is to verify that The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in INSTANTIATED state ... Reference: clause 5.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE @@ -136,7 +135,4 @@ Launch another LCM operation Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfToLevelRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 -SET etag - ${etag} Output response headers ETag - Set Suite Variable ${original_etag} ${etag} + Integer response status 202 diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 8708a7b31a02401f2008eafab7ee99ad3cbab892..28bcb26468aebfd60bd6d684adfde4f73be889d0 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -32,7 +32,7 @@ Get status information about multiple VNF instances PUT status information about multiple VNF instances - Method not implemented [Documentation] Test ID: 6.3.5.12.3 - ... Test title: Put Individual VNF LCM OP occurrences - Method not implemented + ... Test title: PUT status information about multiple VNF instances - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.13.3.3 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -44,7 +44,7 @@ PUT status information about multiple VNF instances - Method not implemented PATCH status information about multiple VNF instances - Method not implemented [Documentation] Test ID: 6.3.5.12.4 - ... Test title: Patch Individual VNF LCM OP occurrences - Method not implemented + ... Test title: PATCH status information about multiple VNF instances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.13.3.4 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -56,7 +56,7 @@ PATCH status information about multiple VNF instances - Method not implemented DELETE status information about multiple VNF instances - Method not implemented [Documentation] Test ID: 6.3.5.12.5 - ... Test title: Delete Individual VNF LCM OP occurrences - Method not implemented + ... Test title: DELETE status information about multiple VNF instances - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.13.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 @@ -64,4 +64,4 @@ DELETE status information about multiple VNF instances - Method not implemented ... Applicability: none ... Post-Conditions: none Delete multiple VNF instances - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 4bfaec14756d0560fea167d36fcac789490e6d7a..7656bc60e6f5d0a74bbb3ae31682bb7d90a0583b 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -38,14 +38,14 @@ POST Scale a vnfInstance to level Conflict (Not-Instantiated) POST Scale a vnfInstance Not Found [Documentation] Test ID: 6.3.5.5.3 ... Test title: POST Scale a vnfInstance Not Found - ... Test objective: The objective is to verify that the operation cannot be executed , because the VNF instance resource cannot be found. + ... Test objective: The objective is to verify that the VNF Scale operation fails when the VNF instance resource is not present ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state ... Reference: clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE ... Applicability: ... Post-Conditions: POST Scale vnfInstance to level - Check HTTP Response Status Code Is 409 + Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -126,4 +126,4 @@ Launch another LCM operation Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Integer response status 202 diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index d36fd9da2d6b909a20a40084da751b478614fc2d..b92279547ad72afaa22fbe01e2929b2ecb800c49 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -16,10 +16,10 @@ POST Create a new subscription ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: in response header Location shall not be null - ... POST Cancel operation task Post Create subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is Subscription + POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 6.3.5.17.2 ... Test title: POST Create a new subscription - DUPLICATION @@ -27,9 +27,8 @@ POST Create a new Subscription - DUPLICATION ... Pre-conditions: none ... Reference: clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE - ... Applicability: none + ... Applicability: SUT should support duplication of subscription creation ... Post-Conditions: in response header Location shall not be null - ... POST Cancel operation task Post Create subscription - DUPLICATION Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is Subscription @@ -41,9 +40,8 @@ POST Create a new Subscription - NO-DUPLICATION ... Pre-conditions: none ... Reference: clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE - ... Applicability: none + ... Applicability: SUT should not support duplication of subscription creation ... Post-Conditions: in response header Location shall not be null - ... POST Cancel operation task Post Create subscription - NO-DUPLICATION Check HTTP Response Status Code Is 303 Check Operation Occurrence Id @@ -64,7 +62,7 @@ GET Subscriptions GET Subscription - Filter [Documentation] Test ID: 6.3.5.17.5 ... Test title: GET Subscriptions - Filter - ... Test objective: The objective is Get the list of active subscriptions using a filter + ... Test objective: The objective is Get the list of active subscriptions using a "filter" ... Pre-conditions: none ... Reference: clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE @@ -170,7 +168,8 @@ DELETE subscriptions - Method not implemented ... Reference: clause 5.4.18.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: check that resources are not deleted DELETE subscriptions Check HTTP Response Status Code Is 405 + Check Subscription resource exist \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index d0737e0c0d3ea006e14eaa9faa54edfecb3599c3..2be255d9fe6d4f2498f20a0bc50e028350c60623 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -922,4 +922,18 @@ GET test endpoint Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} \ No newline at end of file + Clear Requests ${callback_endpoint} + +Check LCM OP OCC resource exist + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Integer response status 200 + +Check Subscription resource exist + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index c9af09e7925b3de2ed13b16fbf7a88a9c9b92948..86df8cacb3dc5b3e0f074dd0a5d066af97f3b52d 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -112,7 +112,7 @@ GET status information about multiple VNF LCM Operation OCC with "exclude_fields Check HTTP Response Body Json Schema Is VnfLcmOpOccs PUT status information about multiple VNF LCM operation occurrences - Method not implemented - [Documentation] Test ID: 6.3.5.11.5 + [Documentation] Test ID: 6.3.5.11.9 ... Test title: PUT status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none @@ -124,7 +124,7 @@ PUT status information about multiple VNF LCM operation occurrences - Method not Check HTTP Response Status Code Is 405 PATCH status information about multiple VNF LCM operation occurrences - Method not implemented - [Documentation] Test ID: 6.3.5.11.6 + [Documentation] Test ID: 6.3.5.11.10 ... Test title: PATCH status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none @@ -136,13 +136,14 @@ PATCH status information about multiple VNF LCM operation occurrences - Method n Check HTTP Response Status Code Is 405 DELETE status information about multiple VNF LCM operation occurrences - Method not implemented - [Documentation] Test ID: 6.3.5.11.7 + [Documentation] Test ID: 6.3.5.11.11 ... Test title: DELETE status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.12.3.5 - ETSI GS NFV-SOL 002 [2] v2.4.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: none - DELETE VNF LCM OP occurrences - Check HTTP Response Status Code Is 405 \ No newline at end of file + ... Post-Conditions: Verify that resources are not deleted + DELETE VNF LCM OP occurences + Check HTTP Response Status Code Is 405 + Check LCM OP OCC resource exist diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index bc6f070f124c8cde93234af6ecf8fbef84f0d01c..859e67ab6371394ef1b1110e072e23ed3d0ed2fd 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -3,6 +3,7 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem +Library String Resource environment/pmJobs.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -324,7 +325,8 @@ Check HTTP Response Body Matches all_fields selector Check HTTP Response Body Matches filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] Check HTTP Response Body Does Not Contain reports Log Checking that field element is missing diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index fd436b22268c016279834b8828909b96b899d50f..419bcf8e3677d6bf685b01952b30a6e0b52a0a16 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -2,6 +2,7 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary +Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource environment/thresholds.txt Library OperatingSystem @@ -195,7 +196,8 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${FILTER_OK} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] Check HTTP Response Status Code Is [Arguments] ${expected_status} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index 11f17fb7fffa7fd75ad0637e4f750b505d8081b4..47eec5aa560d4766b9783700db5f7c8179cfac4d 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -283,8 +283,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} - #TODO + Should Be Equal As Strings ${response['body'][0]['callbackUri']} ${callbackUri_Sub} Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt index 6c80ca057499a74c077810d9de9722499d85c3c8..f1675679ea49b7e4deb60fa76129a081f6390f25 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt @@ -3,3 +3,4 @@ ${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,reports ${response}= httpresponse +${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt index a450bb1b838870598edd7feee1a936c71c5c59f7..c490457435c0921e84a9db9f27ceab2a016c3a82 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt @@ -1,6 +1,6 @@ *** Variables *** -${callbackUri} http://172.22.1.7:9091/vnfpm/subscriptions -${filter_ok} callbackUri=${callbackUri} +${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions +${filter_ok} callbackUri=${callbackUri_Sub} ${filter_ko} erroneousFilter=erroneous ${total_polling_time} 2 min ${polling_interval} 10 sec diff --git a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt b/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt index 256e2c90969b038dff04c8f775ff30e45d6aa5fb..b044c053e51e52eb43e06a93fedc37982fc1632c 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt @@ -2,3 +2,4 @@ ${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${FILTER_KO} criterias=erroneousFilter ${response}= httpresponse +${SEPERATOR} = \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index fb8d10c4a9f3023aa217f8855e1b081ea5a82fbb..e049bbe10931f0c3e512de8d84839922c4b8042f 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -12,6 +12,18 @@ Library Process ${original_etag} 1234 *** Keywords *** +Check created Subscription existence + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Integer response status 200 +Check Postcondition FaultManagement Subscription Is Set + Log Check Postcondition subscription exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + ${output}= Output response + Set Suite Variable ${response} ${output} + Check HTTP Response Status Code Is 200 Check Operation Occurrence Id ${opOccId}= Get Value From Json ${response.headers} $..Location Should Not Be Empty ${opOccId} @@ -62,6 +74,18 @@ Check HTTP Response Header ContentType is Should Be Equal ${response[0]['headers']['Content-Type']} ${expected_contentType} Log Content Type validated +Check Postcondition Subscription Resource Returned in Location Header Is Available + Log Going to check postcondition + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${response['headers']['Location']} + Integer response status 200 + Log Received a 200 OK as expected + ${contentType}= Output response headers Content-Type + Should Contain ${contentType} application/json + ${result}= Output response body + Validate Json FMSubscription.schema.json ${result} + Log Validated FMSubscription schema + Send POST request for fault management Alarms log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} @@ -241,7 +265,7 @@ POST Subscription ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -POST Subscription Duplication permitted +Send POST Request for duplicated subscription Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} @@ -252,7 +276,7 @@ POST Subscription Duplication permitted ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} -POST Subscription Duplication not permitted +Send POST Request for duplicated subscription not permitted Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 1 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} @@ -376,4 +400,4 @@ DELETE Individual Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response - Set Global Variable @{response} ${outputResponse} \ No newline at end of file + Set Global Variable @{response} ${outputResponse} diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index 8b12d1afb896832dac474942e31335fa5911b715..0ffe46fe4cd0ccca89af16975254b7d3b5e6df5d 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -21,6 +21,7 @@ Create a new Fault Management alarm subscription Check HTTP Response Status Code Is 201 Check Operation Occurrence Id Check HTTP Response Body Json Schema Is FmSubscription + Check created Subscription existence Create a new alarm subscription - DUPLICATION @@ -32,10 +33,11 @@ Create a new alarm subscription - DUPLICATION ... Config ID: Config_prod_VNFM ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: duplicated subscription is created - POST Subscription Duplication permitted + Send POST Request for duplicated subscription Check HTTP Response Status Code Is 201 Check Operation Occurrence Id Check HTTP Response Body Json Schema Is FmSubscription + Check Postcondition FaultManagement Subscription Is Set Create a new alarm subscription - NO DUPLICATION [Documentation] Test ID: 7.3.5.3.3 @@ -46,10 +48,10 @@ Create a new alarm subscription - NO DUPLICATION ... Config ID: Config_prod_VNFM ... Applicability: the NFVO decides to not create a duplicate subscription resource ... Post-Conditions: duplicated subscription is not created - POST Subscription Duplication not permitted + Send POST Request for duplicated subscription not permitted Check HTTP Response Status Code Is 303 Check Operation Occurrence Id - Check HTTP Response Body Json Schema Is FmSubscription + Check Postcondition Subscription Resource Returned in Location Header Is Available Retrieve a list of alarm subscriptions [Documentation] Test ID: 7.3.5.3.4 @@ -90,58 +92,6 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails -GET subscriptions with "all_fields" attribute selector - [Documentation] Test ID: 7.3.5.3.7 - ... Test title: GET subscriptions with "all_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_default" attribute selector - [Documentation] Test ID: 7.3.5.3.8 - ... Test title: GET subscriptions with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "fields" attribute selector - [Documentation] Test ID: 7.3.5.3.9 - ... Test title: GET subscriptions with "fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_fields" attribute selector - [Documentation] Test ID: 7.3.5.3.10 - ... Test title: GET subscriptions with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - PUT subscriptions - Method not implemented [Documentation] Test ID: 7.3.5.3.11 ... Test title:PUT subscriptions - Method not implemented @@ -176,4 +126,4 @@ DELETE subscriptions - Method not implemented ... Applicability: none ... Post-Conditions: subscription is not deleted DELETE Subscriptions - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index 426ba2c0c8709fb209429ef734be1c7949621d44..fbdd736cec88cd1dc7b6f35f1f85bdd14ded7901 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -13,6 +13,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library String *** Keywords *** Get All VNF Indicators Subscriptions @@ -183,7 +184,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${filter_ok['callbackUri']} Check HTTP Response Body Matches the Subscription Log Check Response matches subscription @@ -329,8 +330,11 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - #todo - + @{attr} = Split String ${POS_FIELDS} ,${VAR_SEPERATOR} + @{var_name} = Split String @{attr}[0] ,${SEPERATOR} + @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" + Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -397,11 +401,15 @@ Send DELETE Request for indicators in VNF instance Check HTTP Response Body Includes Requested VNF Instances ID Log Check Response includes Indicators according to resource identifier - #todo + Should Be Equal As Strings ${response['body'][0]['vnfInstanceId']} ${vnfInstanceId} Check Postcondition Indicators for VNF instance Exist - Log Check Response includes VNF Indicators according to filter - #todo + Log Check Postcondition Indicators for VNF instance Exist + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Should Be Equal ${response.status_code} 200 + Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. diff --git a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt b/SOL003/VNFIndicator-API/environment/vnfIndicators.txt index 626c660fc5b9dd569defc9b30a3863f63b180b4c..b4ca7ceaa9fcad5846b482cff770f9dd4ae190d4 100644 --- a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt +++ b/SOL003/VNFIndicator-API/environment/vnfIndicators.txt @@ -1,3 +1,5 @@ *** Variables *** ${POS_FIELDS} name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0 ${NEG_FIELDS} wrongName=wrongValue +${SEPERATOR} = +${VAR_SEPERATOR} & \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index 20e6fca2c671c7b909549f55167d1b1a0a00c08b..c0ca2560a5cc821187de651e3e3469a75cbb23b2 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -25,7 +25,7 @@ POST Fail operation task Post Fail operation task Conflict (Not-FAILED_TEMP) # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.15.2 - ... Test title: Post Fail operation task + ... Test title: Post Fail operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. ... Reference: clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 @@ -39,7 +39,7 @@ Post Fail operation task Conflict (Not-FAILED_TEMP) Post Fail operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.15.3 - ... Test title: Post Fail operation task + ... Test title: Post Fail operation task Not Found ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported ... Pre-conditions: ... Reference: clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 @@ -75,7 +75,7 @@ PUT Fail operation task - Method not implemented PATCH Fail operation task - Method not implemented [Documentation] Test ID: 7.3.1.15.6 - ... Test title: GET Fail operation task- Method not implemented + ... Test title: PATCH Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none ... Reference: clause 5.4.16.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index a0de19877fb41fceee4e0ecc587b43cf3a53305e..ad160761eaf6fa3a2f4e5e212ec3606a297e691b 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -37,7 +37,6 @@ Get Information about an individual VNF Instance GET individual vnfInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstance - SET etag PUT Individual VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.2.3 @@ -67,8 +66,8 @@ PATCH Individual VNFInstance PATCH Individual VNFInstance Precondition failed [Documentation] Test ID: 7.3.1.2.5 ... Test title: PATCH Individual VNFInstance Precondition failed - ... Test objective: The objective is to create a new VNF instance resource - ... Pre-conditions: ETag mismatch + ... Test objective: The objective is to test the failure of modification of a vnf instance due to Etag Mismatch. The test also check the JSON schema of failed operation HTTP response. + ... Pre-conditions: VNF Instance is already instantiated. ... Reference: clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: @@ -80,8 +79,8 @@ PATCH Individual VNFInstance Precondition failed PATCH Individual VNFInstance Conflict [Documentation] Test ID: 7.3.1.2.6 ... Test title: PATCH Individual VNFInstance Conflict - ... Test objective: The objective is to test the conflict while modifying a VNF instance resource - ... Pre-conditions: another LCM operation is ongoing + ... Test objective: The objective is to test the conflict while modifying a VNF instance resource because another LCM Operation is ongoing. + ... Pre-conditions: Another LCM operation is ongoing ... Reference: clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: @@ -110,10 +109,11 @@ DELETE Individual VNFInstance Conflict ... Reference: clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: - ... Post-Conditions: + ... Post-Conditions: Resources are not deleted DELETE individual vnfInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails + Check resource existence *** Keywords *** Check resource existence diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot index 6d5d5e302588cd0f9a2cba797664685f81944b97..2ec765914d3c786a1494a498678b3902eb0e26a7 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -13,7 +13,7 @@ POST Scale a vnfInstance [Documentation] Test ID: 7.3.1.4.1 ... Test title: POST Scale a vnfInstance ... Test objective: The objective is to scale a VNF instance - ... Pre-conditions: none + ... Pre-conditions: VNF instance resource is in INSTANTIATED state ... Reference: clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: @@ -94,9 +94,10 @@ DELETE Scale VNFInstance - Method not implemented ... Reference: clause 5.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: - ... Post-Conditions: + ... Post-Conditions: Resource are not deleted DELETE Scale vnfInstance Check HTTP Response Status Code Is 405 + Check resource existence *** Keywords *** Check resource existence @@ -126,4 +127,4 @@ Launch another LCM operation Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfToLevelRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 \ No newline at end of file + Integer response status 202 diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 6fa08f91f2a2842fe8f7ea8a55468077f1f8eb34..021d5ceedcf1b34fd27c5091e6638f95f229fdf0 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -12,7 +12,7 @@ POST Scale a vnfInstance to level [Documentation] Test ID: 7.3.1.5.1 ... Test title: POST Scale a vnfInstance to level ... Test objective: The objective is to scale a VNF instance to a target level. - ... Pre-conditions: none + ... Pre-conditions: VNF instance resource is in INSTANTIATED state ... Reference: clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: @@ -95,9 +95,10 @@ DELETE Scale to level VNFInstance - Method not implemented ... Reference: clause 5.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: - ... Post-Conditions: + ... Post-Conditions: Resources are not deleted DELETE Scale vnfInstance to level Check HTTP Response Status Code Is 405 + Check resource existence *** Keywords *** Check resource existence @@ -127,4 +128,4 @@ Launch another LCM operation Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Integer response status 202 diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index 803ba06c763510c5773c0094ba51b3f9e826a075..15a50340a426530512a07ebd5d18522be8c0823d 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -21,14 +21,15 @@ POST Create a new subscription Post Create subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is Subscription + Create a new Subscription - DUPLICATION [Documentation] Test ID: 7.3.1.17.2 ... Test title: POST Create a new subscription - DUPLICATION - ... Test objective: The POST method creates a duplicate subscription + ... Test objective: The objective is to test request to create a duplicate (same cakkbackurl and filter) subscription ... Pre-conditions: none ... Reference: clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM support the creation of duplicated subscriptions + ... Applicability: duplication is supported by SUT ... Post-Conditions: in response header Location shall not be null Post Create subscription - DUPLICATION Check HTTP Response Status Code Is 201 @@ -37,11 +38,11 @@ Create a new Subscription - DUPLICATION Create a new Subscription - NO-DUPLICATION [Documentation] Test ID: 7.3.1.17.3 ... Test title: POST Create a new subscription - NO-DUPLICATION - ... Test objective: The POST method cannot create a duplicate subscription + ... Test objective: The objective is to test the request that does not create a duplicate (same callbackurl and filter) subscription ... Pre-conditions: none ... Reference: clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM does not support the creation of duplicated subscriptions + ... Applicability: duplication is not supported by SUT ... Post-Conditions: in response header Location shall not be null Post Create subscription - NO-DUPLICATION Check HTTP Response Status Code Is 303 @@ -86,59 +87,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters Get subscriptions - invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET subscriptions with all_fields attribute selector - [Documentation] Test ID: 7.3.1.17.7 - ... Test title: GET subscriptions with all_fields attribute selector - ... Test objective: The objective is Get the list of active subscriptions - ... Pre-conditions: none - ... Reference: clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get subscriptions with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Subscriptions - -GET subscriptions with exclude_default attribute selector - [Documentation] Test ID: 7.3.1.17.8 - ... Test title: GET subscriptions with exclude_default attribute selector - ... Test objective: The objective is Get the list of active subscriptions - ... Pre-conditions: none - ... Reference: clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get subscriptions with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Subscriptions - -GET subscriptions with fields attribute selector - [Documentation] Test ID: 7.3.1.17.9 - ... Test title: GET subscriptions with fields attribute selector - ... Test objective: The objective is Get the list of active subscriptions - ... Pre-conditions: none - ... Reference: clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get subscriptions with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Subscriptions - -GET subscriptions with exclude_fields attribute selector - [Documentation] Test ID: 7.3.1.17.10 - ... Test title: GET subscriptions with exclude_fields attribute selector - ... Test objective: The objective is Get the list of active subscriptions - ... Pre-conditions: none - ... Reference: clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get subscriptions with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Subscriptions - + PUT subscriptions - Method not implemented [Documentation] Test ID: 7.3.1.17.11 ... Test title: PUT subscriptions - Method not implemented @@ -174,4 +123,4 @@ DELETE subscriptions - Method not implemented ... Post-Conditions: subscription not deleted DELETE subscriptions Check HTTP Response Status Code Is 405 - \ No newline at end of file + diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot index a4f2fe2cdc41626d7be0b0e9d1724aafb8fc5cc0..df4d0e2a399ffdca4de4b0c58495d7fe60b9209a 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -13,7 +13,7 @@ POST Terminate a vnfInstance [Documentation] Test ID: 7.3.1.7.1 ... Test title: POST Terminate a vnfInstance ... Test objective: The objective is to test that POST method terminate a VNF instance - ... Pre-conditions: none + ... Pre-conditions: Resource state should be INSTANTIATED ... Reference: clause 5.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: none @@ -112,4 +112,4 @@ Launch another LCM operation Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/scaleVnfRequest.json Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Integer response status 202 diff --git a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot index e0b5a40b547550658ceb9800a722369d06bd5e52..4c55052910ece9b4e635cd17948b2bad0a041766 100644 --- a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot @@ -38,7 +38,7 @@ GET information about multiple VNF instances GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 7.3.1.1.3 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters - ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute-based filtering parameters + ... Test objective: The objective is to test that the retrieval of VNF Instances fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF is instantiated, a bad filter selector (filter selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.4.1). ... Reference: clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM @@ -52,9 +52,8 @@ GET information about multiple VNF instances Bad Request Invalid attribute-based GET information about multiple VNF instances Bad Request Invalid attribute selector [Documentation] Test ID: 7.3.1.1.4 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute selector - ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute selector - ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.4.1). - ... Reference: clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Test objective: The objective is to test that the retrieval of VNF Instances fails when using invalid attribute selector, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - SOL003 v2.4.1). ... Reference: clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -102,7 +101,7 @@ GET information about multiple VNF instances with "fields" attribute selector Check HTTP Response Body Json Schema Is vnfInstances GET information about multiple VNF instances with "exclude_fields" attribute selector - [Documentation] Test ID: 7.3.1.1.7 + [Documentation] Test ID: 7.3.1.1.8 ... Test title: GET information about multiple VNF instances with "exclude_fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances ... Pre-conditions: @@ -115,7 +114,7 @@ GET information about multiple VNF instances with "exclude_fields" attribute sel Check HTTP Response Body Json Schema Is vnfInstances PUT multiples VNFInstances - Method not implemented - [Documentation] Test ID: 7.3.1.1.5 + [Documentation] Test ID: 7.3.1.1.9 ... Test title: PUT multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: @@ -127,7 +126,7 @@ PUT multiples VNFInstances - Method not implemented Check HTTP Response Status Code Is 405 PATCH multiples VNFInstances - Method not implemented - [Documentation] Test ID: 7.3.1.1.6 + [Documentation] Test ID: 7.3.1.1.10 ... Test title: PATCH multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: @@ -139,13 +138,16 @@ PATCH multiples VNFInstances - Method not implemented Check HTTP Response Status Code Is 405 DELETE VNFInstances - Method not implemented - [Documentation] Test ID: 7.3.1.1.7 + [Documentation] Test ID: 7.3.1.1.11 ... Test title: DELETE multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: ... Reference: clause 5.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_VNFM ... Applicability: - ... Post-Conditions: + ... Post-Conditions: resources are not deleted DELETE multiple vnfInstances Check HTTP Response Status Code Is 405 + Verify Resources not Deleted + + diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index f94a5510c83efaa5592d954b527bf5ec6aa55779..52952aa7c669f7a476594bc63ff48ef204895ac8 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -1147,4 +1147,12 @@ GET test endpoint Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} \ No newline at end of file + Clear Requests ${callback_endpoint} +Verify Resources not Deleted + log Trying to get information about an individual VNF instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${response['body']['id']} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index c9abf0d887c0121e5b3e31dd443c00362ccc61ea..f96fcf2dbe81ae8681c6da5580f8bf65b329f7dd 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -16,7 +16,7 @@ ${polling} 10 sec Requests a grant for a particular VNF lifecycle operation - Synchronous mode [Documentation] Test ID: 7.3.2.1.1 ... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure + ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: ... Reference: clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO @@ -31,7 +31,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode Requests a grant for a particular VNF lifecycle operation - Asynchronous mode [Documentation] Test ID: 7.3.2.1.2 ... Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation + ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: ... Reference: clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO @@ -46,13 +46,13 @@ Requests a grant for a particular VNF lifecycle operation - Asynchronous mode Requests a grant for a particular VNF lifecycle operation - Forbidden [Documentation] Test ID: 7.3.2.1.3 ... Test title: Requests a grant for a particular VNF lifecycle operation - Forbidden - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and check the content of the problem details data structure returned - ... Pre-conditions: The grant should not be accorded - ... Reference: clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and the grant is rejected + ... Pre-conditions: none + ... Reference: clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send Request a new Grant Forbidden + Send Request for a new Grant Forbiden Operation Check HTTP Response Status Code Is 403 Check HTTP Response Body Json Schema Is ProblemDetails @@ -100,9 +100,10 @@ DELETE Grants - Method not implemented ... Reference: clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: resources are not deleted Delete Grants Check HTTP Response Status Code Is 405 + Get an individual grant - Successful *** Keywords *** Wait for individual grant successful notification @@ -129,7 +130,7 @@ Send Request Grant Request in Asynchronous mode ${body}= Output response Set Suite Variable &{response} ${body} -Send Request a new Grant Forbidden +Send Request for a new Grant Forbiden Operation Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants Log The grant request should be rejected Set Headers {"Accept": "${ACCEPT}"} @@ -177,9 +178,6 @@ Get an individual grant - Successful Get ${response['headers']['Location']} Log Validate Status code Integer response status 200 - ${result} Output response body - Validate Json grant.schema.json ${result} - Log Validation OK Get Grants Log Trying to perform a GET. This method should not be implemented @@ -214,4 +212,4 @@ Delete Grants ${body}= Output response Set Suite Variable &{response} ${body} - \ No newline at end of file + diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 2cd9a3d6fa2b0f7c9fc00457f3f22b0f75752c4f..e7d7962b187fa069e37f67b155ad81b4ad81230b 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -27,13 +27,13 @@ POST Individual Grant - Method not implemented GET an individual grant - Successful [Documentation] Test ID: 7.3.2.2.2 ... Test title: GET an individual grant - Successful - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation + ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation. ... Pre-conditions: The grant information is available to the VNFM ... Reference: clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Get individual grant success + Get individual grant Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is grant @@ -41,13 +41,13 @@ GET an individual grant - Process ongoing [Tags] no-synchronous-mode [Documentation] Test ID: 7.3.2.2.3 ... Test title: GET an individual grant - Process ongoing - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation + ... Test objective: The objective is to retrieve a grant for a particular VNF lifecycle operation when process is ongoing and no grant is available yet. ... Pre-conditions: The process of creating the grant is ongoing, no grant is available yet. ... Reference: clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Get individual grant on-going + Get individual grant Check HTTP Response Status Code Is 202 Check HTTP Response Body Json Schema Is grant @@ -55,13 +55,13 @@ GET an individual grant - grant rejected [Tags] no-synchronous-mode [Documentation] Test ID: 7.3.2.2.4 ... Test title: GET an individual grant - grant rejected - ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation - ... Pre-conditions: + ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation but error returned because grant has been rejected. + ... Pre-conditions: none ... Reference: clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The grant is rejected - Get individual grant rejected + ... Post-Conditions: none + Get individual grant Check HTTP Response Status Code Is 403 Check HTTP Response Body Json Schema Is ProblemDetails @@ -97,27 +97,12 @@ DELETE an individual grant - Method not implemented ... Reference: clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: grant not deleted + ... Post-Conditions: none Delete individual Grant Check HTTP Response Status Code Is 405 -*** Keywords *** -Get individual grant rejected - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable &{response} ${body} -Get individual grant on-going - log Trying to read an individual grant - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} - ${body}= Output response - Set Suite Variable &{response} ${body} - -Get individual grant success +*** Keywords *** +Get individual grant log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} @@ -177,4 +162,4 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} \ No newline at end of file + Validate Json ${schema} ${response[0]['body']} diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 62bd86a74750df598a7c503898e48b46096ccb3f..00839ae3c07638a942c253964b1daf27c3507bf6 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -15,6 +15,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library String *** Keywords *** @@ -54,7 +55,10 @@ GET VNF Packages with attribute-based filter Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} + @{var_id} = Split String @{attr}[0] ,${SEPERATOR} + @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' @@ -631,8 +635,8 @@ 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 - #TODO - + @{words} = Split String ${filter_ok} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL003/VNFPackageManagement-API/environment/subscriptions.txt b/SOL003/VNFPackageManagement-API/environment/subscriptions.txt index 171d1862447b1a4b6349d0f7bf623485d963c679..ca34ee831fbdd3dd3727821ab00ee81d82c00fc6 100644 --- a/SOL003/VNFPackageManagement-API/environment/subscriptions.txt +++ b/SOL003/VNFPackageManagement-API/environment/subscriptions.txt @@ -4,3 +4,4 @@ ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant f ${callbackUri} http://172.22.1.7:9091/vnfpkgm/subscriptions ${total_polling_time} 2 min ${polling_interval} 10 sec +${SEPERATOR} = \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt b/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt index 9786732e6ba2f30f8373efb232ab00fb56a59052..ff87485e017f6ead1e9f0ab3dc53f5d7c1eb25f6 100644 --- a/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt +++ b/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt @@ -3,3 +3,5 @@ ${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field ${fields} softwareImages,additionalArtifacts ${response} httpresponse +${SEPERATOR} = +${VAR_SEPERATOR} & \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 801655db0af8064f231727869f6c0d95e8877fc6..e47a3ac9c811accdd167b1ce668b788f25ea61e9 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -3,6 +3,7 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem +Library String Resource environment/pmJobs.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary @@ -324,7 +325,8 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] Check HTTP Response Body Does Not Contain reports Log Checking that field element is missing diff --git a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index 15d256da00cbfebf58ffe22e60eadd180e44dbf6..a1587b8e31e88ba1114db7d27f9b052b0aa97aa6 100644 --- a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -283,8 +283,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Performance Management according to filter - # Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri} - #TODO + Should Be Equal As Strings ${response[0]['body']['callbackUri']} ${callbackUri_Sub} Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt index 30b6682ef16874d7784cdbcf8a6f1926ecbe06f3..9891d3fed1ef2b09983dd918d21e21111a6e94a5 100644 --- a/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt +++ b/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt @@ -3,3 +3,4 @@ ${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,objectInstanceIds ${response} httpresponse +${SEPERATOR} = \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt index 304f9a2c2a04d52d71ad833bd48e8d1b0c452e8e..46984c68ed09364e8d9f4bd38d5c274c8569cee5 100644 --- a/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt +++ b/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt @@ -1,6 +1,6 @@ *** Variables *** -${callbackUri} http://172.22.1.7:9091/vnfpm/subscriptions -${filter_ok} callbackUri=${callbackUri} +${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions +${filter_ok} callbackUri=${callbackUri_Sub} ${filter_ko} erroneousFilter=erroneous ${total_polling_time} 2 min ${polling_interval} 10 sec diff --git a/SOL005/NSDManagement-API/NSDContent.robot b/SOL005/NSDManagement-API/NSDContent.robot index 6b01def2f26b81f11395c0e2f43620a26e97d836..40f5298543e7838ca271cd27420cd5be6ea1103b 100644 --- a/SOL005/NSDManagement-API/NSDContent.robot +++ b/SOL005/NSDManagement-API/NSDContent.robot @@ -147,9 +147,11 @@ Upload NSD Content as Zip file in asynchronous mode ... Reference: clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the upload of NSD contents in asynchronous mode - ... Post-Conditions: none + ... Post-Conditions: NSD Uploaded Send PUT Request to upload NSD Content as zip file in asynchronous mode Check HTTP Response Status Code Is 202 + Check Post Condition NSD Content has been Uploaded + Upload NSD Content as plain text file in asynchronous mode [Documentation] Test ID: 5.3.1.3.12 @@ -162,6 +164,7 @@ Upload NSD Content as plain text file in asynchronous mode ... Post-Conditions: none Send PUT Request to upload NSD Content as plain text file in asynchronous mode Check HTTP Response Status Code Is 202 + Check Post Condition NSD Content has been Uploaded Upload NSD Content as Zip file in synchronous mode [Documentation] Test ID: 5.3.1.3.13 diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index bbdc8f7c69f19c425192bc2b181490d11d9ba979..c6888eedc1c1e0e7a6c7e221b404990ba01f0048 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -12,6 +12,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library String *** Keywords *** GET all Network Service Descriptors Information @@ -26,13 +27,14 @@ GET Network Service Descriptors Information with attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?${POS_FIELDS} + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?${NSD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body NsdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${NSD_NAME} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['nsdName']} @{words}[1] GET Network Service Descriptors Information with invalid attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name @@ -443,6 +445,18 @@ Send PUT Request to upload NSD Content as plain text file in synchronous mode ${output}= Output response Set Suite Variable ${response} ${output} +Check Post Condition NSD Content has been Uploaded + Log Checking NsdOnboardingNotification Recieved + Wait Until Keyword Succeeds ${retry} ${interval} Check Response is NsdOnboardingNotification + +Check Response is NsdOnboardingNotification + ${response}= Output response body + Should Contain ${response['headers']['Content-Type']} application/json + ${schema} = Catenate SEPARATOR= NsdOnboardingNotification .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + + Check Postcondition NSD Content is uploaded and available in the NFVO Get single file NSD Content in Plain or Zip Format Check HTTP Response Status Code Is 200 @@ -495,13 +509,14 @@ GET PNF Descriptors Information with attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?${POS_FIELDS} + GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?${PNFD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body PnfdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${PNFD_NAME} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['pnfdName']} @{words}[1] GET PNF Descriptors Information with invalid attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name @@ -888,12 +903,11 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Is Empty Should Be Empty ${response['body']} Log No json schema is provided. Validation OK - - + Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NSD Management Management according to filter - #TODO - + @{words} = Split String ${filter_ok} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL005/NSDManagement-API/PNFDContent.robot b/SOL005/NSDManagement-API/PNFDContent.robot index ae0ac97068ba67b5db4e3badfd48f90b15332203..a3b3458bfd8d090fbcb1d519aa215370aef950e1 100644 --- a/SOL005/NSDManagement-API/PNFDContent.robot +++ b/SOL005/NSDManagement-API/PNFDContent.robot @@ -53,7 +53,7 @@ Upload PNFD Content as plain text file ... Test title: Upload PNFD Content as plain text file ... Test objective: The objective is to test the upload of a PNFD Content in plain text format. ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 5.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The uploaded PNFD content is available in the NFVO @@ -67,7 +67,7 @@ Upload PNFD Content with conflict due to onboarding state ... Test title: Upload PNFD Content with conflict due to onboarding state ... Test objective: The objective is to test that the upload of the PNFD Content fails due to a conflict when the PNFD is not in onboarding state CREATED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response ... Pre-conditions: The onboarding state of the PNFD for which the PNFD Content is requested is different from CREATED. - ... Reference: clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 5.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSDManagement-API/environment/nsDescriptors.txt b/SOL005/NSDManagement-API/environment/nsDescriptors.txt index 1ac118a28efa3e23529bca5f6f7461b144d4cf33..b16e19ee9d6f66bc9c2da0e885b399b15737addb 100644 --- a/SOL005/NSDManagement-API/environment/nsDescriptors.txt +++ b/SOL005/NSDManagement-API/environment/nsDescriptors.txt @@ -29,3 +29,6 @@ ${wrong_etag} abcd ${usageState} state ${length} 1024 ${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f +${NSD_NAME} nsdName=onBoardedNSD +${PNFD_NAME} pnfdName=onBoardedPNFD +${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/subscriptions.txt b/SOL005/NSDManagement-API/environment/subscriptions.txt index 553e803c8ca2672bd409772040b44eb3253e7efb..d8c0411021732e5676a5aa65e2dc168a37e48d82 100644 --- a/SOL005/NSDManagement-API/environment/subscriptions.txt +++ b/SOL005/NSDManagement-API/environment/subscriptions.txt @@ -1,3 +1,4 @@ *** Variables *** ${filter_ok} callbackUri=http://172.22.1.7:9091/nsd/subscriptions ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based +${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index 9f9d5956c6cffa1e8a2c3a69786c08f568e96493..9de189269667ca498646849674ee0e05086a72e0 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -37,3 +37,5 @@ ${NFVO_ALLOWS_DUPLICATE_SUBS} 1 ${total_polling_time} 2 min ${polling_interval} 10 sec ${response} +${retry} 5x +${interval} 5 sec \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/Alarms.robot b/SOL005/NSFaultManagement-API/Alarms.robot index a4f600f145cfac3048686594e72b7f18a46381d2..83003c2041e14ade347d4810a6dc9f307636761c 100644 --- a/SOL005/NSFaultManagement-API/Alarms.robot +++ b/SOL005/NSFaultManagement-API/Alarms.robot @@ -57,60 +57,7 @@ GET information about multiple alarms Bad Request Invalid attribute-based filter GET Alarms With Invalid Filters Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET information about multiple alarms with "all_fields" attribute selector - [Documentation] Test ID: 5.3.3.1.5 - ... Test title: GET information about multiple alarms with "all_fields" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - GET Alarms Task with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - -GET information about multiple alarms with exclude_default attribute selector - [Documentation] Test ID: 5.3.3.1.6 - ... Test title: GET information about multiple alarms with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - GET Alarms Task with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - - -GET information about multiple alarms with fields attribute selector - [Documentation] Test ID: 5.3.3.1.7 - ... Test title: GET information about multiple alarms with fields attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - GET Alarms Task with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - -GET information about multiple alarms with "exclude_fields" attribute selector - [Documentation] Test ID: 5.3.3.1.8 - ... Test title: GET information about multiple alarms with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: none - GET Alarms Task with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms - + PUT Alarms - Method not implemented [Documentation] Test ID: 5.3.3.1.5 ... Test title: PUT Alarms - Method not implemented diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index 960ac1b105bf583a589ddc0de4269a5b18e0e6f7..7dbfa21532d77bb9a0fd950ca3a8e2a871e3094c 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -49,7 +49,6 @@ Create a new alarm subscription - NO DUPLICATION Post Create subscription - NO-DUPLICATION Check HTTP Response Status Code Is 303 Check Operation Occurrence Id - Check HTTP Response Body Json Schema Is FmSubscription Retrieve a list of alarm subscriptions [Documentation] Test ID: 5.3.3.3.4 @@ -89,59 +88,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters GET Subscriptions with Invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - -GET subscriptions with "all_fields" attribute selector - [Documentation] Test ID: 5.3.3.3.7 - ... Test title: GET subscriptions with "all_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - Get subscriptions with all_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_default" attribute selector - [Documentation] Test ID: 5.3.3.3.8 - ... Test title: GET subscriptions with "exclude_default" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_default attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "fields" attribute selector - [Documentation] Test ID: 5.3.3.3.9 - ... Test title: GET subscriptions with "fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - Get subscriptions with fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - -GET subscriptions with "exclude_fields" attribute selector - [Documentation] Test ID: 5.3.3.3.10 - ... Test title: GET subscriptions with "exclude_fields" attribute selector - ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 - ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: - Get subscriptions with exclude_fields attribute selector - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions - + PUT subscriptions - Method not implemented [Documentation] Test ID: 5.3.3.3.11 ... Test title:PUT subscriptions - Method not implemented @@ -176,4 +123,4 @@ DELETE subscriptions - Method not implemented ... Applicability: none ... Post-Conditions: subscription is not deleted DELETE Subscriptions - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot index 2d9f11583ae7c7439b5c7eba2da8f9aeea0bf34f..034b3649795bc5bb5584ef35aa2c7454959a1b2e 100644 --- a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot @@ -60,7 +60,7 @@ GET Continue operation task - Method not implemented Check HTTP Response Status Code Is 405 PUT Continue operation task - Method not implemented - [Documentation] Test ID: 5.3.2.13.5 + [Documentation] Test ID: 5.3.2.12.5 ... Test title: PUT Continue operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none @@ -72,11 +72,11 @@ PUT Continue operation task - Method not implemented Check HTTP Response Status Code Is 405 PATCH Continue operation task - Method not implemented - [Documentation] Test ID: 5.3.2.13.5 + [Documentation] Test ID: 5.3.2.12.6 ... Test title: PATCH Continue operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: clause 6.4.14.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.13.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -84,11 +84,11 @@ PATCH Continue operation task - Method not implemented Check HTTP Response Status Code Is 405 DELETE Continue operation task - Method not implemented - [Documentation] Test ID: 5.3.2.13.5 + [Documentation] Test ID: 5.3.2.12.7 ... Test title: DELETE Continue operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: clause 6.4.14.3.5 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.13.3.5 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -96,4 +96,4 @@ DELETE Continue operation task - Method not implemented Check HTTP Response Status Code Is 405 - \ No newline at end of file + diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index db919f10f424613dd2394dff5d8d97a520526c07..348e7e873e4c07005c0b51d08553b8a420bc7ff8 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -10,7 +10,7 @@ Library JSONSchemaLibrary schemas/ *** Test Cases *** NS Instance Creation - [Documentation] Test ID: 5.3.2.17 + [Documentation] Test ID: 5.3.2.18.1 ... Test title: NS Instance Creation ... Test objective: The objective is to test the workflow for Creating a NS instance ... Pre-conditions: none diff --git a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot index 38ca80c7f4900674b792245d3e861afb8c19ea28..289debbfdcb340d94bd29ee55adc01a1d9af0d52 100644 --- a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot @@ -8,15 +8,16 @@ Library JSONSchemaLibrary schemas/ *** Test Cases *** NS Instance Deletion - [Documentation] Test ID: 5.3.2.18 + [Documentation] Test ID: 5.3.2.18.2 ... Test title: NS Instance Deletion ... Test objective: The objective is to test the workflow for Deleting a NS instance ... Pre-conditions: the resource is in NOT_INSTANTIATED state ... Reference: clause 6.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: NS Instance resource is deleted Check resource not_instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 204 - Check HTTP Response Body Json Schema Is NsIdentifierDeletionNotification \ No newline at end of file + Check HTTP Response Body Json Schema Is NsIdentifierDeletionNotification + Check Instance Deleted \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot index 5f9018bb4a7c3a286f215c08dac2f84d12a097e7..af83a9b208d16273b3c049a4ae1ec8e8eec43e8a 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot @@ -10,14 +10,14 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** Heal Flow of NS lifecycle management operations - [Documentation] Test ID: 5.3.2.19 + [Documentation] Test ID: 5.3.2.18.3 ... Test title: Heal Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Healing a NS instance ... Pre-conditions: the resource is in INSTANTIATED state ... Reference: clause 6.4.7 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: NS Instance still in INSTANTIATED state Check resource instantiated POST Heal NSInstance Check HTTP Response Status Code Is 202 diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index c4a19e193c4f6142d5a32d32d48799a8c0a5f68a..8114b240f97d58c5a2c3a392d1162cd69324f160 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -16,9 +16,10 @@ POST Individual NSInstance - Method not implemented ... Reference: clause 6.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not created on the NFVO + ... Post-Conditions: Check Postcondition NS Instance is not created POST IndividualNSInstance Check HTTP Response Status Code Is 405 + Check Postcondition NS Instance is not created GET Information about an individual NS Instance [Documentation] Test ID: 5.3.2.2.2 @@ -41,9 +42,10 @@ PUT Individual NSInstance - Method not implemented ... Reference: clause 6.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified on the NFVO + ... Post-Conditions: Check Postcondition NS Instance is not modified PUT IndividualNSInstance Check HTTP Response Status Code Is 405 + Check Postcondition NS Instance is not modified PATCH Individual NSInstance - Method not implemented [Documentation] Test ID: 5.3.2.2.4 @@ -53,9 +55,10 @@ PATCH Individual NSInstance - Method not implemented ... Reference: clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified on the NFVO + ... Post-Conditions: Check Postcondition NS Instance is not modified PATCH IndividualNSInstance Check HTTP Response Status Code Is 405 + Check Postcondition NS Instance is not modified DELETE Individual NSInstance [Documentation] Test ID: 5.3.2.2.5 @@ -65,9 +68,10 @@ DELETE Individual NSInstance ... Reference: clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is deleted from the NFVO + ... Post-Conditions: Check Postcondition NS Instance is deleted DELETE IndividualNSInstance Check HTTP Response Status Code Is 204 + Check Postcondition NS Instance is deleted DELETE Individual NSInstance Conflict [Documentation] Test ID: 5.3.2.2.6 @@ -77,7 +81,8 @@ DELETE Individual NSInstance Conflict ... Reference: clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted from the NFVO + ... Post-Conditions: Check Postcondition NS Instance is not deleted DELETE IndividualNSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition NS Instance is not deleted diff --git a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot index 8535a8a82724bdc31ad7be1dd23596b336cfbe86..2ef539a46a259d5a125cc38f3aa957aa20352345 100644 --- a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot @@ -10,7 +10,7 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** Instantiate Flow of NS lifecycle management operations - [Documentation] Test ID: 5.3.2.20 + [Documentation] Test ID: 5.3.2.18.4 ... Test title: Instantiate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Instantiate a NS instance ... Pre-conditions: the resource is in NOT_INSTANTIATED state diff --git a/SOL005/NSLifecycleManagement-API/NSInstances.robot b/SOL005/NSLifecycleManagement-API/NSInstances.robot index be75709a5efd64b0d66d92e6b47804743a6ba7ee..72121da4162f40e5e6035e7421629bc83d452ded 100644 --- a/SOL005/NSLifecycleManagement-API/NSInstances.robot +++ b/SOL005/NSLifecycleManagement-API/NSInstances.robot @@ -11,8 +11,8 @@ POST Create a new NsInstance [Documentation] Test ID: 5.3.2.1.1 ... Test title: POST Create a new NsInstance ... Test objective: The objective is to test the creation of a new Ns Instances and perform a JSON schema validation of the collected instance data structure - ... Pre-conditions: None. - ... Reference: clause 6.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Pre-conditions: An NS Instance is already created + ... Reference: clause 6.4.2.3.1 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: A Ns instance is instantiated. @@ -25,8 +25,8 @@ GET information about multiple NS instances [Documentation] Test ID: 5.3.2.1.2 ... Test title: GET information about multiple NS instances ... Test objective: The objective is to test the retrieval of all the available NS Instances and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: An existing Ns instance. - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Pre-conditions: An NS Instance is already created + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. @@ -37,9 +37,9 @@ GET information about multiple NS instances GET information about multiple NS instances Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 5.3.2.1.3 ... Test title: GET information about multiple NS instances Bad Request Invalid attribute-based filtering parameters - ... Test objective: The objective is to test the retrieval of all the available NS Instances using attribute-based filter and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: A Ns instance is instantiated, a bad filter parameter (filter parameters are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.4.1). - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Test objective: The objective is to query information about multiple NS instances with Invalid attribute-based filtering parameters + ... Pre-conditions: An Ns instance is instantiated, a bad attribute-based filter parameter is either malformed or syntactically incorrect (filter parameters are listed in Table 6.4.2.3.2-1 - SOL005 v2.4.1) + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. @@ -50,9 +50,9 @@ GET information about multiple NS instances Bad Request Invalid attribute-based GET information about multiple NS instances Bad Request Invalid attribute selector [Documentation] Test ID: 5.3.2.1.4 ... Test title: GET information about multiple NS instances Bad Request Invalid attribute selector - ... Test objective: The objective is to test the retrieval of all the available NS Instances using attribute-based filter and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector (attribute selectors are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.4.1). - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Test objective: The objective is to query information about multiple NS instances with Invalid attribute selector + ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector parameter is either malformed or syntactically incorrect (filter parameters are listed in Table 6.4.2.3.2-1 - SOL005 v2.4.1) + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. @@ -64,59 +64,59 @@ GET NSInstances with "all_fields" attribute selector ... Test title: GET NSInstances with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector ... Pre-conditions: - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: Get NSInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "exclude_default" attribute selector [Documentation] Test ID: 5.3.2.1.6 ... Test title: GET NSInstances with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector ... Pre-conditions: - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: Get NSInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "fields" attribute selector [Documentation] Test ID: 5.3.2.1.7 ... Test title: GET NSInstances with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector ... Pre-conditions: - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: Get NSInstances with fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances GET NSInstances with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.2.1.8 ... Test title: GET NSInstances with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector ... Pre-conditions: - ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: Get NSInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is FmSubscriptions + Check HTTP Response Body Json Schema Is NsInstances PUT NSInstances - Method not implemented [Documentation] Test ID: 5.3.2.1.9 ... Test title: PUT Individual NS instance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: clause 6.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.3 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not modified by the operation @@ -128,7 +128,7 @@ PATCH NSInstances - Method not implemented ... Test title: PATCH NSInstances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: clause 6.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.4 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not modified by the operation @@ -140,9 +140,9 @@ DELETE NSInstances - Method not implemented ... Test title: DELETE NSInstances - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: clause 6.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.4.1 + ... Reference: clause 6.4.2.3.5 - ETSI GS NFV-SOL 005 v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not deleted by the operation DELETE NSInstances - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index fee83255668269ed1d2f2700e9cc4f7eadb0f09e..a1968087fbc0d265360ff9f3bef588c0abb5b0e7 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -6,6 +6,7 @@ Library Process Library JSONSchemaLibrary schemas/ Library OperatingSystem Library MockServerLibrary +Library Collections *** Keywords *** Initialize System @@ -30,6 +31,13 @@ Check subscription existence Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 200 +Check Instance Deleted + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Integer response status 404 + Check Fail not supported Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} @@ -150,12 +158,32 @@ Check resource existence Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} Integer response status 200 +Check Postcondition NS Instance is not created + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Integer response status 404 + Check HTTP Response Status Code Is [Arguments] ${expected_status} Log Validate Status code Should Be Equal as Strings ${response[0]['status']} ${expected_status} Log Status code validated +Check Postcondition NS Instance is deleted + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Integer response status 404 + +Check Postcondition NS Instance is not modified + GET IndividualNSInstance + ${resp_dict}= evaluate json.loads('''${response[0]['body']}''') json + ${body}= Get File jsons/CreateNsRequest.json + Dictionaries Should Be Equal ${resp_dict} ${body} values=True + Check HTTP Response Header Contains [Arguments] ${HEADER_TOCHECK} Should Contain ${response[0]['headers']} ${HEADER_TOCHECK} @@ -167,6 +195,13 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK +Check Postcondition NS Instance is not deleted + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Integer response status 200 + Check HTTP Response Header ContentType is [Arguments] ${expected_contentType} Log Validate content type @@ -1066,4 +1101,4 @@ PUT notification Verify Mock Expectation ${req} Log Cleaning the endpoint Clear Requests ${callback_endpoint} - \ No newline at end of file + diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot index eb1445037ec29f0ac1bfa51a7635497132e7acea..2624d99497bec649f3fe56586a942991bbdc3b9e 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot @@ -10,7 +10,7 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** Scale Flow of NS lifecycle management operations - [Documentation] Test ID: 5.3.2.21 + [Documentation] Test ID: 5.3.2.18.5 ... Test title: Instantiate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Instantiate a NS instance ... Pre-conditions: the resource is in NOT_INSTANTIATED state diff --git a/SOL005/NSLifecycleManagement-API/Subscriptions.robot b/SOL005/NSLifecycleManagement-API/Subscriptions.robot index a7235f29ffdae62c2e6bb660776313f59e21bd9b..c6343a16972e9d01bc10ea4ca0813d81550265c7 100644 --- a/SOL005/NSLifecycleManagement-API/Subscriptions.robot +++ b/SOL005/NSLifecycleManagement-API/Subscriptions.robot @@ -141,7 +141,7 @@ GET subscriptions with "exclude_fields" attribute selector Check HTTP Response Body Json Schema Is FmSubscriptions PUT subscriptions - Method not implemented - [Documentation] Test ID: 5.3.2.15.7 + [Documentation] Test ID: 5.3.2.15.11 ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS lifecycle management subscription ... Pre-conditions: none @@ -153,7 +153,7 @@ PUT subscriptions - Method not implemented Check HTTP Response Status Code Is 405 PATCH subscriptions - Method not implemented - [Documentation] Test ID: 5.3.2.15.8 + [Documentation] Test ID: 5.3.2.15.12 ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS lifecycle management subscription ... Pre-conditions: none @@ -165,7 +165,7 @@ PATCH subscriptions - Method not implemented Check HTTP Response Status Code Is 405 DELETE subscriptions - Method not implemented - [Documentation] Test ID: 5.3.2.15.9 + [Documentation] Test ID: 5.3.2.15.13 ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method cannot modify a NS lifecycle management subscription ... Pre-conditions: none diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot index 05681f5ccc58235e04a7079462f1b59102d5d781..383cec244923f4fbe6a1430bc8bff191872e750c 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot @@ -10,7 +10,7 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** Terminate Flow of NS lifecycle management operations - [Documentation] Test ID: 5.3.2.22 + [Documentation] Test ID: 5.3.2.18.6 ... Test title: Terminate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Terminate a NS instance ... Pre-conditions: the resource is in INSTANTIATED state diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot index 6c7cf1e6b3ad38f5197af7f9f51768e9ef12bf94..a042cafad452217d8a199b176fb7d550e857644a 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -12,7 +12,7 @@ POST Update a NSInstance [Documentation] Test ID: 5.3.2.5.1 ... Test title: POST Update a NSInstance ... Test objective: The objective is to test that POST method update a NS instance - ... Pre-conditions: an existing NS Instance + ... Pre-conditions: An Ns Instance is already created. ... Reference: clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -25,7 +25,7 @@ POST Update a NSInstance Conflict [Documentation] Test ID: 5.3.2.5.2 ... Test title: POST Update a NSInstance Conflict ... Test objective: The objective is to test that POST method fail if a NS Instance is not existing or is not in NOT_INSTANTIATED state - ... Pre-conditions: an existing NS Instance + ... Pre-conditions: An Ns Instance is already created ... Reference: clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.4.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -82,4 +82,4 @@ DELETE Update NSInstance - Method not implemented DELETE Update NSInstance Check HTTP Response Status Code Is 405 - \ No newline at end of file + diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot index 844a85b8db5761cc35d3531f086ad6fb1a51a512..de681d761bd0fbdd46c7cbb28da930e04ec5d0a9 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot @@ -10,7 +10,7 @@ Suite Teardown Terminate All Processes kill=true *** Test Cases *** Update Flow of NS lifecycle management operations - [Documentation] Test ID: 5.3.2.23 + [Documentation] Test ID: 5.3.2.18.7 ... Test title: Update Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Update a NS instance ... Pre-conditions: the resource is in INSTANTIATED state diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index e688ea43657d87aba40bf3f9c4b2ed637e245fcf..eaa4fb63fbf840debdd08a1530a567785601a0be 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -15,6 +15,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library String *** Keywords *** GET all NS Performance Monitoring Jobs @@ -172,7 +173,9 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo + ${user}= Get Value From Json ${response['body']} $..userDefinedData + Validate Json UserDefinedData.schema.json ${user[0]} + Log Validation for schema OK Check HTTP Response Body PmJobs Do Not Contain reports Log Checking that field element is missing @@ -349,7 +352,7 @@ GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the NFVO with filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK_Threshold} ${output}= Output response Set Suite Variable ${response} ${output} @@ -420,7 +423,9 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - #todo + @{words} = Split String ${FILTER_OK_Threshold} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] + GET Individual NS performance Threshold Log Trying to get a Threhsold present in the NFVO @@ -653,8 +658,8 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NS Package Management according to filter - #TODO - + @{words} = Split String ${filter_ok} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription diff --git a/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt b/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt index fec8c84b57f2f27c991fda4ae7b5b640f7159289..78a574197d739221a5462a2884452624be7ed3fc 100644 --- a/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt +++ b/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt @@ -1,3 +1,4 @@ *** Variables *** ${filter_ok} callbackUri=http://localhost/subscriptions ${filter_ko} erroneousFilter=erroneous +${SEPERATOR} = diff --git a/SOL005/NSPerformanceManagement-API/environment/thresholds.txt b/SOL005/NSPerformanceManagement-API/environment/thresholds.txt index 49461a0953bcdd310d7a8ddabc78efea1b4d946f..587560f0d556da259fb3666360ddcb090d2b6e6b 100644 --- a/SOL005/NSPerformanceManagement-API/environment/thresholds.txt +++ b/SOL005/NSPerformanceManagement-API/environment/thresholds.txt @@ -1,3 +1,4 @@ *** Variables *** -${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${FILTER_OK_Threshold} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${FILTER_KO} criterias=erroneousFilter +${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/Subscriptions.robot b/SOL005/VNFPackageManagement-API/Subscriptions.robot index 32fd85cc1e926c3636c0bd2f7b3e87f8b94adec2..df40b1055bfbbf5551efade730b3a6130d009c18 100644 --- a/SOL005/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL005/VNFPackageManagement-API/Subscriptions.robot @@ -37,7 +37,7 @@ Get VNF Package Subscriptions with attribute-based filter ... Post-Conditions: none Get VNF Package Subscriptions with attribute-based filters Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PkgmSubscription + Check HTTP Response Body Json Schema Is PkgmSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 618ef76f76a8ed4afdd044a1c55fe21b08b96459..eb8c08db4e0645f16fe1f3f006fd4245031dbaf9 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -14,6 +14,7 @@ Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library Process Library MockServerLibrary +Library String *** Keywords *** @@ -59,8 +60,11 @@ GET VNF Packages with attribute-based filter Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - #todo - + @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} + @{var_id} = Split String @{attr}[0] ,${SEPERATOR} + @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" + GET VNF Packages with invalid attribute-based filter Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId' Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -907,7 +911,8 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - #TODO + @{words} = Split String ${filter_ok} ,${SEPERATOR} + Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body Subscription Identifier matches the requested Subscription Log Trying to check response ID diff --git a/SOL005/VNFPackageManagement-API/environment/subscriptions.txt b/SOL005/VNFPackageManagement-API/environment/subscriptions.txt index cddf01eefe53be9d8ba95fe114462d481e56e156..ca34ee831fbdd3dd3727821ab00ee81d82c00fc6 100644 --- a/SOL005/VNFPackageManagement-API/environment/subscriptions.txt +++ b/SOL005/VNFPackageManagement-API/environment/subscriptions.txt @@ -3,4 +3,5 @@ ${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based ${callbackUri} http://172.22.1.7:9091/vnfpkgm/subscriptions ${total_polling_time} 2 min -${polling_interval} 10 sec \ No newline at end of file +${polling_interval} 10 sec +${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt index e7e4eecb25a1a067e01debded892d11d73e24771..8f599ef60e0a6c0bb1da6116f2e035e686ffae1a 100644 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt +++ b/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt @@ -6,3 +6,5 @@ ${fields} softwareImages,additionalArtifacts ${response} httpresponse ${NEG_AUTHORIZATION} Bearer negativetoken ${BAD_AUTHORIZATION} Bear sometoken +${SEPERATOR} = +${VAR_SEPERATOR} & diff --git a/requirements.txt b/requirements.txt index 6555fbf2f7ace864f9f76da63a620f27fba4733c..7ec1190495ac1486e8197859602d284336cbbbf7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ ## To install the libraries, use: # pip -r requirements.txt + robotframework==3.1 RESTinstance==1.0.0rc4 robotframework-dependencylibrary==1.0.0.post1