diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index a9b632d942f6fecdda0554c2cd1ceeafcf518125..113bec26b96fbc489c47964940faf6df9b7f241a 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -1,7 +1,6 @@ *** Settings *** -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} -... spec=SOL002-VNFConfiguration-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem @@ -79,7 +78,7 @@ DELETE Config - Method not implemented Log Validate Status code Integer response status 405 -*** Keywords *** +*** Keywords *** Get VNF configuration Log Query VNF The GET method queries information about a configuration. Set Headers {"Accept":"${ACCEPT}"} @@ -124,8 +123,7 @@ Check HTTP Response Body Json Schema Is [Arguments] ${schema} ${contentType}= Get Value From Json ${response.headers} $..Content-Type Should Be Equal ${contentType} ${CONTENT_TYPE} - ${json}= evaluate json.loads('''${response.body}''') json - Validate Json ${schema} ${json} + Validate Json ${schema} ${response.body} Log Json Schema Validation OK Check Postcondition VNF Configuration Untouched diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index 063cd47c126ad5586799f03b118dba1310873275..c363e2086a04aedaa372cf1e185794ce08312f4b 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -1,7 +1,13 @@ *** Variables *** + +${Etag}= an etag +${Etag_modified}= 12345 +${response}= httpresponse + ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO ${EM-VNF_SCHEMA} https + ${ACCEPT} application/json ${AUTH_USAGE} 1 ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== @@ -9,8 +15,6 @@ ${CONTENT_TYPE} application/json ${apiRoot} / ${apiName} vnfconfig ${apiVersion} v1 -${Etag}= an etag -${Etag_modified}= a modified etag ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${alarm_filter} managedObjectId ${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index 33fa0f43c5d4dec174b73d15716240aa3ed3d718..e2ab4b7822b5fd32ec9dcbb81e3fcca1a45f8bc1 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -2,7 +2,6 @@ # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFFaultManagement-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem @@ -35,8 +34,7 @@ Get information about multiple alarms ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json alarms.schema.json ${json} + Validate Json alarms.schema.json ${result} Log Validation OK Get information about multiple alarms with filters @@ -58,8 +56,7 @@ Get information about multiple alarms with filters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json alarms.schema.json ${json} + Validate Json alarms.schema.json ${result} Log Validation OK Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters @@ -78,8 +75,7 @@ Get information about multiple alarms Bad Request Invalid attribute-based filter Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Alarms - Method not implemented diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 4ca642eb9cf017368286ddd047b858ee7fdd57d1..d81cb4dcfcb7bfc440018c7908aabf8eac26c722 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFFaultManagement-API.yaml Suite Setup Check resource existance *** Test Cases *** diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 260dfebcdd5961fc9f6c380fb8eebf2e8721b97c..5fe680cb7d9383d5b3dfbdc48ec7ecde2acf6b9d 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -2,7 +2,6 @@ # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFFaultManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Get information about a configuration ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json alarm.schema.json ${json} + Validate Json alarm.schema.json ${result} Log Validation OK PUT Alarm - Method not implemented @@ -72,8 +70,7 @@ PATCH Alarm ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json alarmModifications.schema.json ${json} + Validate Json alarmModifications.schema.json ${result} Log Validation OK PATCH Alarm - Conflict @@ -95,8 +92,7 @@ PATCH Alarm - Conflict Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PATCH Alarm - Precondition failed @@ -119,8 +115,7 @@ PATCH Alarm - Precondition failed Log Validate Status code Integer response status 412 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Alarm - Method not implemented diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index a6afd61e16d1fd3980faa4f597f042e9ff541db9..9c251085bf6628526296d3762de529a76007ed8a 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -3,7 +3,6 @@ Resource environment/variables.txt Library JSONLibrary Library JSONSchemaLibrary schemas/ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFFaultManagement-API.yaml Documentation This resource represents an individual subscription for VNF alarms. ... The client can use this resource to read and to terminate a subscription to notifications related to VNF fault management. Suite Setup Check resource existance @@ -36,8 +35,7 @@ Get Information about an individual subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK PUT an individual subscription - Method not implemented diff --git a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index a448be6524b212cbc402bc08060d0dbc0970fe7c..1ead4aa8437108f0340d7d5792b4232a0f96c5d1 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot @@ -20,13 +20,13 @@ Deliver a notification - Alarm ${json}= Get File schemas/alarmNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Log Verifying results Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${callback_uri} + Clear Requests ${callback_endpoint} Deliver a notification - Alarm Clearance [Documentation] Test ID: 7.4.5.2 @@ -41,13 +41,13 @@ Deliver a notification - Alarm Clearance ${json}= Get File schemas/alarmClearedNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Log Verifying results Wait Until Keyword Succeeds ${sleep_interval} Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${callback_uri} + Clear Requests ${callback_endpoint} Deliver a notification - Alarm List Rebuilt [Documentation] Test ID: 7.4.5.3 @@ -62,7 +62,7 @@ Deliver a notification - Alarm List Rebuilt ${json}= Get File schemas/alarmListRebuiltNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle alarmNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Log Verifying results @@ -80,36 +80,49 @@ Test a notification end point ... Applicability: ... Post-Conditions: log The GET method allows the server to test the notification endpoint - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${notification_ep} - Log Validate Status code - Integer response status 204 - Log Validation OK + &{req}= Create Mock Request Matcher GET ${callback_endpoint} + &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Verify Mock Expectation ${req} + Clear Requests ${callback_endpoint} PUT notification - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Put ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + Log PUT Method not implemented + &{req}= Create Mock Request Matcher PUT ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} PATCH subscriptions - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Patch ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + Log PATCH Method not implemented + &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} DELETE subscriptions - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Delete ${callback_endpoint} - Log Validate Status code - Output response - Integer response status 405 + Log DELETE Method not implemented + &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} *** Keywords *** Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4 + Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4 + diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index bfeca6bdf17e8545cdf4840c9a3e26db4a189751..996a6499c00445fd9b8667c9e569e6d69022a582 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFFaultManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -29,8 +28,7 @@ Create a new subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK Create a new Subscription - DUPLICATION @@ -43,7 +41,7 @@ Create a new Subscription - DUPLICATION ... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test + Pass Execution If ${VNFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} @@ -54,8 +52,7 @@ Create a new Subscription - DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK Create a new Subscription - NO-DUPLICATION @@ -98,8 +95,7 @@ GET Subscriptions Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscriptions.schema.json ${json} + Validate Json FmSubscriptions.schema.json ${result} Log Validation OK GET Subscription - Filter @@ -118,8 +114,7 @@ GET Subscription - Filter Integer response status 200 Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscriptions.schema.json ${json} + Validate Json FmSubscriptions.schema.json ${result} Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters @@ -140,8 +135,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT subscriptions - Method not implemented diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 4035655b7a2af786fe38ec59bafc0d97e2501359..e3d485e806adaff758727f480b63811144c909cd 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -4,12 +4,17 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https ${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== ${ACCEPT} application/json +${AUTH_USAGE} 1 +${alarm_filter} managedObjectId +${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c +${invalid_alarm_filter} badFilter ${apiRoot} / ${apiName} vnffm ${apiVersion} v1 -${AUTH_USAGE} 1 ${CONTENT_TYPE} application/json +${VNFM_DUPLICATION} 0 + ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${Etag}= an etag ${Etag_modified}= a modified etag @@ -17,27 +22,18 @@ ${CONTENT_TYPE_PATCH} application/merge-patch+json ${PerceivedSeverity} CRITICAL -${VNFM_DUPLICATION} 0 - ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${sleep_interval} 20s -${callback_schema} http -${callback_uri} localhost + +${callback_uri} http://localhost ${callback_port} 9091 -${callback_endpoint} /notification +${callback_endpoint} /endpoint +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s ${AlarmNotification} {} ${AlarmClearedNotification} {} ${AlarmListRebuiltNotification} {} -${PerceivedSeverity} CRITICAL -${sleep_interval} 20s -${alarm_filter} managedObjectId -${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c -${invalid_alarm_filter} badFilter -${notification_ep} /notification -${notification_port} 9091 -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index d0c154ce3827f4cd59b984a738505caad479026d..0cef9b542989267357a5349cd9351994ef1bc3fc 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -16,9 +16,8 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with VnfIndicatorSubscription schema - Validate Json VnfIndicatorSubscription.schema.json ${json} + Validate Json VnfIndicatorSubscription.schema.json ${result} Log Validated VnfIndicatorSubscription schema GET Subscription - Negative (Not Found) @@ -31,9 +30,8 @@ GET Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Subscription @@ -54,9 +52,8 @@ DELETE Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${problemDetails}= Output - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Subscription - (Method not implemented) diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index d7e79091bb0e4114e673950407cc3a31cbf7f994..466c0db6adfd0c579ea22416b0af6ebd54ed9555 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -15,8 +15,7 @@ GET Individual VNF Indicator Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicator.schema.json ${json} + Validate Json vnfIndicator.schema.json ${result} Log Validation OK GET Individual VNF Indicator - Negative (Not Found) @@ -30,8 +29,7 @@ GET Individual VNF Indicator - Negative (Not Found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Individual VNF Indicator (Method not implemented) diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 4e28c6625eafee5f9ccee8eb83a83304274fdeb6..a549a8558ce70e4b21e6945f48a10f5d11289e94 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -17,9 +17,8 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscriptions.schema.json ${json} - Log Validated VnfIndicatorSubscriptions schema + Validate Json VnfIndicatorSubscriptions.schema.json ${result} + Log Validated VnfIndicatorSubscription schema GET Subscription - Filter Log Trying to get the list of subscriptions using filters @@ -31,8 +30,7 @@ GET Subscription - Filter Should Contain ${contentType} application/json Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscriptions.schema.json ${json} + Validate Json VnfIndicatorSubscriptions.schema.json ${result} Log Validated VnfIndicatorSubscriptions schema GET Subscription - Negative Filter @@ -46,8 +44,7 @@ GET Subscription - Negative Filter Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Not Found) @@ -61,8 +58,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Subscription @@ -78,8 +74,7 @@ POST Subscription Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscription.schema.json ${json} + Validate Json VnfIndicatorSubscription.schema.json ${result} Log Validation of VnfIndicatorSubscription OK PUT Subscription - (Method not implemented) diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 8bcfd9a382959353e317e45eeb99e08f62d1df72..b157562adc6de516cd37009854b403b2cf362255 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -20,8 +20,7 @@ GET all Indicators Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET all Indicators - Filter @@ -37,8 +36,7 @@ GET all Indicators - Filter Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET all Indicators - Negative (wronge filter name) @@ -52,8 +50,7 @@ GET all Indicators - Negative (wronge filter name) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators - Negative (Unauthorized: Wrong Token) @@ -68,8 +65,7 @@ GET all Indicators - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators - Negative (Unauthorized: No Token) @@ -84,8 +80,7 @@ GET all Indicators - Negative (Unauthorized: No Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators (Negative: Not found) @@ -99,8 +94,7 @@ GET all Indicators (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all Indicators (Method not implemented) diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 8ca81017bb9c306b63265588cdd74089211b5713..3f7502e9481c2a4b4e2ad578176190fcf67aa53d 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -17,8 +17,7 @@ GET Indicators on VNF Instance Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET Indicators on VNF Instance - Filter @@ -31,8 +30,7 @@ GET Indicators on VNF Instance - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET Indicators on VNF Instance - Negative Filter @@ -45,8 +43,7 @@ GET Indicators on VNF Instance - Negative Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Indicators on VNF Instance - Negative (Not Found) @@ -60,8 +57,7 @@ GET Indicators on VNF Instance - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Indicators on VNF Instance - (Method not implemented) diff --git a/SOL002/VNFIndicator-API/environment/variables.txt b/SOL002/VNFIndicator-API/environment/variables.txt index 6b3ba9427c5a847aa7935ea030a9213c4bebd9dc..1c53ac7bb662cc92a6b2a9f74b77548ed142a1bb 100644 --- a/SOL002/VNFIndicator-API/environment/variables.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -1,4 +1,9 @@ *** Variables *** +${PRODUCER_HOST} localhost +${PRODUCER_PORT} 8081 +${PRODUCER_SCHEMA} https +${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${CONTENT_TYPE_JSON} application/json ${EM-VNF_HOST} localhost ${EM-VNF_PORT} 8002 ${EM-VNF_SCHEMA} https @@ -7,6 +12,3 @@ ${AUTH_USAGE} 1 ${apiRoot} / ${apiVersion} v1 ${apiName} vnfind -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken -${CONTENT_TYPE_JSON} application/json diff --git a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot index 2ae26999fd830c077d6518f53f498ef0022d1b35..0856f08e15aa1acd7c8dbfb2baf78847a3e8c02b 100644 --- a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -36,8 +35,7 @@ Post Cancel operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Cancel operation task Conflict (parallel LCM operation) @@ -54,10 +52,9 @@ Post Cancel operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Post Cancel operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -74,8 +71,7 @@ Post Cancel operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Cancel operation task - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index e277b04101c2b8d8dbbc9040442d2d427d55e420..ed9b1c4bfd2f18f39b532fba7ea0986441a05661 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL003-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -38,10 +37,9 @@ Change external VNF connectivity Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished GET Change external VNF connectivity - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index ac35e93080a0afb0f01b37625012cc9d8dd13fa1..4ae2da6d383cb0de4898797007722723bbf2fecf 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Change deployment flavour of a vnfInstance Conflict (parallel LCM operation) @@ -60,10 +58,9 @@ Change deployment flavour of a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Change deployment flavour of a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -81,8 +78,7 @@ Change deployment flavour of a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK diff --git a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot index 519a6d3ef722e8ba71962be6cc1d9323228c76d4..2e160b6cb394c0acf6fb245de274343fbcfe7934 100644 --- a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Post Fail operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Fail operation task Conflict (parallel LCM operation) @@ -57,10 +55,9 @@ Post Fail operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Post Fail operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -77,8 +74,7 @@ Post Fail operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Fail operation task - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot index 5f89ea8e549084125326b0b0fd3f188624b5fbc2..e72d796d288f19c9df545ec71b4e03ce82851a50 100644 --- a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Heal a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Heal a vnfInstance Conflict (parallel LCM operation) @@ -60,10 +58,9 @@ Heal a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Heal a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -81,8 +78,7 @@ Heal a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Heal VNFInstance - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot index b8ff08a0cb2351740931c660839ff3bf4a730254..026a3a7dccab38c84c7c217135589a3d28790883 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL003-VNFLifecycleManagement-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Documentation This resource represents an individual subscription. The client can use this resource to read and to terminate a @@ -25,9 +24,8 @@ Get Information about an individual subscription Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Log Validate Status code Integer response status 200 - ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscription.schema.json ${json} + ${result}= Output response body + Validate Json subscription.schema.json ${result} Log Validation OK PUT an individual subscription - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 3a05017125f095f3101ae53347eab3b77cb87560..5a184c315262c1151c434c423d02287f3312f2eb 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -2,7 +2,6 @@ # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library DependencyLibrary Library JSONLibrary @@ -37,8 +36,7 @@ Get Information about an individual VNF Instance ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstance.schema.json ${json} + Validate Json vnfInstance.schema.json ${result} Log Validation OK PUT Individual VNFInstance - Method not implemented @@ -86,8 +84,7 @@ PATCH Individual VNFInstance Precondition failed ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PATCH Individual VNFInstance Conflict @@ -107,10 +104,9 @@ PATCH Individual VNFInstance Conflict ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished DELETE Individual VNFInstance [Documentation] Delete VNF Identifier This method deletes an individual VNF instance resource. @@ -136,8 +132,7 @@ DELETE Individual VNFInstance Conflict ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK *** Keywords *** diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index dabe95a3f923321541640ef55f8dff79a4f0c631..3d76de314529ad41b883303ada98d0c903d211c9 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Documentation This resource represents a VNF lifecycle management operation occurrence. The client can use this resource to read @@ -32,8 +31,7 @@ Get Individual VNF LCM OP occurences ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfLcmOpOcc.schema.json ${json} + Validate Json vnfLcmOpOcc.schema.json ${result} Log Validation OK PUT Individual VNF LCM OP occurences - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 56b9bc237702b23cebb25fabf61c83d421dd1ee2..f560800f6b4c5fe5a36d59622ab9d6ad7bbad4db 100644 --- a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library DependencyLibrary Library OperatingSystem Library JSONLibrary @@ -42,8 +41,7 @@ Instantiate a vnfInstance Conflict ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Instantiate VNFInstance - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot index 3afd29d82a9f60262b5f7545d481a68551dab2c2..1c442cd888cd6c2f76d55b5148d973b76653e184 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -6,8 +6,6 @@ Library MockServerLibrary Library Process Library OperatingSystem -*** Variables *** -${sleep_interval} 20s *** Test Cases *** Deliver a notification - Operation Occurence @@ -15,75 +13,88 @@ Deliver a notification - Operation Occurence ${json}= Get File schemas/vnfLcmOperationOccurrenceNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Deliver a notification - Id Creation log The POST method delivers a notification from the server to the client. ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint}} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Deliver a notification - Id deletion log The POST method delivers a notification from the server to the client. ${json}= Get File schemas/vnfIdentifierCreationNotification.schema.json ${BODY}= evaluate json.loads('''${json}''') json Log Creating mock request and response to handle vnfLcmOperationOccurrenceNotification - &{req}= Create Mock Request Matcher POST ${notification_ep} body_type="JSON_SCHEMA" body=${BODY} + &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Log Verifying results Verify Mock Expectation ${req} Log Cleaning the endpoint - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} Test a notification end point log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher GET ${notification_ep} + &{req}= Create Mock Request Matcher GET ${callback_endpoint} &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 Create Mock Expectation ${req} ${rsp} Sleep ${sleep_interval} Verify Mock Expectation ${req} - Clear Requests ${notification_ep} + Clear Requests ${callback_endpoint} PUT notification - Method not implemented - log Trying to perform a PUT. This method should not be implemented - Put ${notification_ep} - Log Validate Status code - Output response - Integer response status 405 + Log PUT Method not implemented + &{req}= Create Mock Request Matcher PUT ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} PATCH subscriptions - Method not implemented - log Trying to perform a PATCH. This method should not be implemented - Patch ${notification_ep} - Log Validate Status code - Output response - Integer response status 405 + Log PATCH Method not implemented + &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} + DELETE subscriptions - Method not implemented - log Trying to perform a DELETE. This method should not be implemented - Delete ${notification_ep} - Log Validate Status code - Output response - Integer response status 405 + Log DELETE Method not implemented + &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} + &{rsp}= Create Mock Response status_code=405 + Create Mock Expectation ${req} ${rsp} + Sleep ${sleep_interval} + Log Verifying results + Verify Mock Expectation ${req} + Log Cleaning the endpoint + Clear Requests ${callback_endpoint} *** Keywords *** Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-5.3.9 + Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-5.3.9 diff --git a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot index 4e5cd6ebe659d3a3240cb5dedcaa5f032d1afaa5..64ea5da79073fc8b35e1d5128743b1d36d4a8e7c 100644 --- a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Operate a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Operate a vnfInstance Conflict (parallel LCM operation) @@ -60,10 +58,9 @@ Operate a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Operate a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -81,8 +78,7 @@ Operate a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Operate VNFInstance - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot index edc6c38592ea641dcc66366397a3224e542bbb1f..ce6afdd19007a73c9a6322fa7af57726f0aaae4f 100644 --- a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -38,8 +37,7 @@ Post Retry operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Retry operation task Conflict (parallel LCM operation) @@ -57,10 +55,9 @@ Post Retry operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Post Retry operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -77,8 +74,7 @@ Post Retry operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Retry operation task - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot index cdd006472660d02eadac58d9cb036c1a94c3ab85..0e98a8fb7ae59bcaa5f1dae5ffcf0c728882beaa 100644 --- a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -37,8 +36,7 @@ Post Rollback operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Rollback operation task Conflict (parallel LCM operation) @@ -56,10 +54,9 @@ Post Rollback operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Post Rollback operation task Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -77,8 +74,7 @@ Post Rollback operation task Not Found Output response Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Rollback operation task - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot index a1a7e0cb2a1c14a6efa53fa6fa9854a8cdc89b41..8f7a4c3f72570cc9c9baefa71c18aa4ae12e86e5 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -38,8 +37,7 @@ Scale a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Scale a vnfInstance Conflict (parallel LCM operation) @@ -58,10 +56,9 @@ Scale a vnfInstance Conflict (parallel LCM operation) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Scale a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -79,8 +76,7 @@ Scale a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Scale VNFInstance - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 1c54fde86dc0969ed1b0b775279d038f9b62a3c3..61d72bd1aedfe4e389fb7d2383ffb346ff343986 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -38,8 +37,7 @@ Scale a vnfInstance to level Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Scale a vnfInstance to level Conflict (parallel LCM operation) @@ -57,10 +55,9 @@ Scale a vnfInstance to level Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished Scale a vnfInstance Not Found # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent @@ -78,8 +75,7 @@ Scale a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index 6987af290d275562f286ef6ec06f63cd21e735bf..4d2c30f3e42108ca1577684778477fbb83eefbf5 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -21,8 +20,7 @@ Create a new subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscription.schema.json ${json} + Validate Json subscription.schema.json ${result} Log Validation OK Create a new Subscription - DUPLICATION @@ -38,8 +36,7 @@ Create a new Subscription - DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscription.schema.json ${json} + Validate Json subscription.schema.json ${result} Log Validation OK Create a new Subscription - NO-DUPLICATION @@ -66,8 +63,7 @@ GET Subscriptions Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscriptions.schema.json ${json} + Validate Json subscriptions.schema.json ${result} Log Validation OK GET Subscription - Filter @@ -78,8 +74,7 @@ GET Subscription - Filter Integer response status 200 Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscriptions.schema.json ${json} + Validate Json subscriptions.schema.json ${result} Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters @@ -91,8 +86,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT subscriptions - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot index 7cb566379086fc3bf6a857c589ecebb8d5f1b5cb..854fc1e8fc190de18faf1d18067b56bdfe65c161 100644 --- a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -39,8 +38,7 @@ Terminate a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Terminate a vnfInstance Conflict (parallel LCM operation) @@ -60,10 +58,9 @@ Terminate a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK - [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished + #[Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished GET Terminate VNFInstance - Method not implemented log Trying to perform a GET. This method should not be implemented diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index 894c63df63e1718616ac1a1d145eb710b871a351..28da64c66f1041ba389feb5278edb8ad246d983c 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -2,14 +2,13 @@ # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ *** Test Cases *** Create a new vnfInstance - [Setup] #make sure the vnfInstand ${vnfInstanceId} doesn't exist + #[Setup] #make sure the vnfInstand ${vnfInstanceId} doesn't exist Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} @@ -23,8 +22,7 @@ Create a new vnfInstance ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstance.schema.json ${json} + Validate Json vnfInstance.schema.json ${result} Log Validation OK Get information about multiple VNF instances @@ -38,8 +36,7 @@ Get information about multiple VNF instances ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstances.schema.json ${json} + Validate Json vnfInstances.schema.json ${result} Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters @@ -53,8 +50,7 @@ Get information about multiple VNF instances Bad Request Invalid attribute-based ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute selector @@ -68,8 +64,7 @@ Get information about multiple VNF instances Bad Request Invalid attribute selec ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT VNFInstances - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 99357a27316f14eef871e41a4acda8f0a0392045..b843ddbd954efca9174056b11f4c44c35cf5ec99 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -1,7 +1,6 @@ *** Settings *** Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} -... spec=SOL002-VNFLifecycleManagement-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Documentation This resource represents VNF lifecycle management operation occurrences. The client can use this resource to query @@ -27,8 +26,7 @@ Get stauts information about multiple VNF LCM OP OCC ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfLcmOpOccs.schema.json ${json} + Validate Json vnfLcmOpOccs.schema.json ${result} Log Validation OK Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters @@ -39,8 +37,7 @@ Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribu Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector @@ -51,8 +48,7 @@ Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribu Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT stauts information about multiple VNF LCM OP OCC - Method not implemented diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index a7a1493631671ed472dff23506a49ea3357e9a2a..4c78837e9a7dbbb1bac6110cb1d883a5f27f5aa4 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -31,12 +31,12 @@ ${VNFM_DUPLICATION} 0 ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${notification_ep} /notification -${notification_port} 9091 ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} + +${callback_uri} http://localhost ${callback_port} 9091 -${callback_schema} http -${callback_uri} localhost -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file +${callback_endpoint} /endpoint +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index fbc64d769588f6de59fad9cd8d104afb976a067b..53676409ae4caf26bacf0d321e7d952e815c54f1 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -16,8 +16,7 @@ GET Individual PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK GET Individual PM Job - Negative (Not Found) @@ -31,8 +30,7 @@ GET Individual PM Job - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual PM Job diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index e8752ea65c263a9e1382e80c3bf611c15e65b5cc..9de659ada5b6bb82976c49266d50f5e07c40e077 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -24,8 +24,7 @@ GET Report on Single PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate result with PerformanceReport schema ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PerformanceReport.schema.json ${json} + Validate Json PerformanceReport.schema.json ${result} GET Report on Single PM Job - Negative (Not Found) [Documentation] The client can use this method for reading an individual performance report. @@ -38,8 +37,7 @@ GET Report on Single PM Job - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Reports - (Method not implemented) diff --git a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot index 09444c6be00b311a0a191c157db2ff40c65d15af..5c9f4cd77f55b1426e556ac002216ab3597a2a4d 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot @@ -22,8 +22,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema GET Individual Subscription - Negative (Not Found) @@ -39,8 +38,7 @@ GET Individual Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Individual Subscription - (Method not implemented) diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index bb52856ef3e406ae2fa44143bdc0085f5f26836b..70d3901133273777955f014a7c628499d538808a 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -19,9 +19,8 @@ GET Individual Threshold ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} GET Individual Threshold - Negative (Not Found) [Documentation] The client can use this method to query information about thresholds. @@ -34,8 +33,7 @@ GET Individual Threshold - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual Threshold @@ -59,9 +57,8 @@ DELETE Individual Threshold - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} POST Individual Threshold - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index f6ea5998ac96835b7cde58fafa49ca8da69ce001..185cdceece438257b79cd9ce60f52d8ad1b4f48b 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -17,11 +17,10 @@ GET all Pm Jobs Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -35,8 +34,7 @@ GET all Pm Jobs - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK GET all Pm Jobs - all_fields @@ -49,19 +47,18 @@ GET all Pm Jobs - all_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK Log Validating _links schema - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -75,11 +72,10 @@ GET all Pm Jobs - exclude_default Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -94,15 +90,14 @@ GET all Pm Jobs - fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK @@ -117,15 +112,14 @@ GET all Pm Jobs - exclude_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected Log Checking that criteria element is missing - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Should Be Empty ${criteria} Log Criteria element is empty as expected @@ -140,8 +134,7 @@ GET all Pm Jobs - Negative (wronge filter name) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Pm Jobs (Negative: Not found) @@ -155,8 +148,7 @@ GET all Pm Jobs (Negative: Not found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all PM Jobs - Create new PM Job @@ -172,8 +164,7 @@ POST all PM Jobs - Create new PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK PUT all PM Jobs - (Method not implemented) diff --git a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot b/SOL002/VNFPerformanceManagement-API/Subscriptions.robot index fafc6f83e3d9307965fdfbaf4c96d9fdc699cfd7..10cba1036409aa0f3860618d06486413ef9f6aba 100644 --- a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot +++ b/SOL002/VNFPerformanceManagement-API/Subscriptions.robot @@ -22,8 +22,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Filter @@ -39,8 +38,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Negative Filter (Erroneous filter) @@ -56,8 +54,7 @@ GET Subscription - Negative Filter (Erroneous filter) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema GET Subscription - Negative (Not Found) @@ -73,8 +70,7 @@ GET Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Subscription @@ -97,8 +93,7 @@ POST Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers @@ -152,8 +147,7 @@ POST Subscription - NO DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 23a82a8bae7b8eb60782abd0f2057815547f7f20..8ace19a8512caa0446d00b0b31419dc19bfc0f46 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -19,9 +19,8 @@ GET Thresholds ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - Filter [Documentation] The client can use this method to query information about thresholds. @@ -34,9 +33,8 @@ GET Thresholds - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with Threshold schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - NEGATIVE Filter [Documentation] The client can use this method to query information about thresholds. @@ -47,9 +45,8 @@ GET Thresholds - NEGATIVE Filter GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} Integer response status 400 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} GET Thresholds - Negative (Not Found) [Documentation] The client can use this method to query information about thresholds. @@ -61,9 +58,8 @@ GET Thresholds - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Threshold Request @@ -78,9 +74,8 @@ POST Threshold Request Integer response status 201 Log Received 201 Created as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} Log Trying to validate the Location header ${headers}= Output response headers Should Contain ${headers} Location diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index 02a62dc13a83ad81865c2ed7a622b9bfab20ad2f..3573520e58f67323a98c3601ad60a0d4f97ade25 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -1,18 +1,16 @@ *** Variables *** ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https -${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${CONTENT_TYPE_JSON} application/json -${ACCEPT_JSON} application/json + ${apiRoot} / -${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken ${apiVersion} v1 ${apiName} vnfpm + + +${CONTENT_TYPE_JSON} application/json +${ACCEPT_JSON} application/json +${NEG_AUTHORIZATION} Bearer negativetoken ${FIELD_USAGE} 1 ${VNFM_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 ${VNFM_AUTH_USAGE} 1 diff --git a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot index bc3c9a49fb75071720fceb3339603090722713e5..c6948aacca8fa00332503aa33061166266ac8f59 100644 --- a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot +++ b/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot @@ -111,6 +111,6 @@ DELETE Performance Notification *** Keywords *** Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/Alarms.robot b/SOL003/VNFFaultManagement-API/Alarms.robot index 3e5089234eb512d7bc6e8e055db91b9bfebc956f..26e38d5697bc846cfcbf51c9f81108685770ce68 100644 --- a/SOL003/VNFFaultManagement-API/Alarms.robot +++ b/SOL003/VNFFaultManagement-API/Alarms.robot @@ -35,8 +35,7 @@ Get information about multiple alarms ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Alarms.schema.json ${json} + Validate Json Alarms.schema.json ${result} Log Validation OK Get information about multiple alarms with filters @@ -58,8 +57,7 @@ Get information about multiple alarms with filters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Alarms.schema.json ${json} + Validate Json Alarms.schema.json ${result} Log Validation OK Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters @@ -78,8 +76,7 @@ Get information about multiple alarms Bad Request Invalid attribute-based filter Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Alarms - Method not implemented diff --git a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot index 0fef1927371fdae72f8f03c7652a274551462d55..11fb1cfc8738735e4b44e09a4afd0d6f8822dfd8 100644 --- a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot @@ -40,8 +40,7 @@ Get information about an alarm ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json alarm.schema.json ${json} + Validate Json alarm.schema.json ${result} Log Validation OK PUT Alarm - Method not implemented @@ -74,8 +73,7 @@ PATCH Alarm ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json AlarmModification.schema.json ${json} + Validate Json AlarmModification.schema.json ${result} Log Validation OK PATCH Alarm - Conflict @@ -96,8 +94,7 @@ PATCH Alarm - Conflict Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PATCH Alarm - Precondition failed @@ -120,8 +117,7 @@ PATCH Alarm - Precondition failed Log Validate Status code Integer response status 412 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Alarm - Method not implemented diff --git a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot index 45e735fd0e8a69e12cf69b5fa6e87c424794d424..8fc2d26c37ae41bd7eaf507288ee20a9f94c8e01 100644 --- a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot @@ -36,8 +36,7 @@ Get Information about an individual subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK PUT an individual subscription - Method not implemented diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index f6affa00eb1acb5f2054beb8a7d17404fc8aae42..d19f401d547bafe75268054f9b06f4217fdaf8c1 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -29,8 +29,7 @@ Create a new subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK Create a new Subscription - DUPLICATION @@ -54,8 +53,7 @@ Create a new Subscription - DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscription.schema.json ${json} + Validate Json FmSubscription.schema.json ${result} Log Validation OK Create a new Subscription - NO-DUPLICATION @@ -98,8 +96,7 @@ GET Subscriptions Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscriptions.schema.json ${json} + Validate Json FmSubscriptions.schema.json ${result} Log Validation OK GET Subscription - Filter @@ -118,8 +115,7 @@ GET Subscription - Filter Integer response status 200 Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json FmSubscriptions.schema.json ${json} + Validate Json FmSubscriptions.schema.json ${result} Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters @@ -140,8 +136,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT subscriptions - Method not implemented diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 2254b161f73a46aa60388638b9e01020682ed902..3e49746813efa0a41e60f4367b91fcb7f6e49916 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -16,9 +16,8 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with VnfIndicatorSubscription schema - Validate Json VnfIndicatorSubscription.schema.json ${json} + Validate Json VnfIndicatorSubscription.schema.json ${result} Log Validated VnfIndicatorSubscription schema GET Subscription - Negative (Not Found) @@ -31,9 +30,8 @@ GET Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Unauthorized: Wrong Token) @@ -47,8 +45,7 @@ GET Subscription - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Subscription @@ -69,9 +66,8 @@ DELETE Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${problemDetails}= Output - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Subscription - (Method not implemented) diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index fb7b1a193216a813ab0ac514e84583ef7ffc96cc..37edb4cab5166d74da071dc9b67b1accf8d66d99 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -15,8 +15,7 @@ GET Individual VNF Indicator Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicator.schema.json ${json} + Validate Json vnfIndicator.schema.json ${result} Log Validation OK GET Individual VNF Indicator - Negative (Not Found) @@ -30,8 +29,7 @@ GET Individual VNF Indicator - Negative (Not Found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token) @@ -46,8 +44,7 @@ GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Individual VNF Indicator - Negative (Unauthorized: No Token) @@ -61,8 +58,7 @@ GET Individual VNF Indicator - Negative (Unauthorized: No Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Individual VNF Indicator (Method not implemented) diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index 59c29cf50f22454de144160d1eab6727d5d23d12..fe87ab7aedc9b7cbce4563e050a472938e8bbb5f 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -17,8 +17,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscriptions.schema.json ${json} + Validate Json VnfIndicatorSubscriptions.schema.json ${result} Log Validated VnfIndicatorSubscription schema GET Subscription - Filter @@ -31,8 +30,7 @@ GET Subscription - Filter Should Contain ${contentType} application/json Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscriptions.schema.json ${json} + Validate Json VnfIndicatorSubscriptions.schema.json ${result} Log Validated VnfIndicatorSubscriptions schema GET Subscription - Negative Filter @@ -46,8 +44,7 @@ GET Subscription - Negative Filter Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Not Found) @@ -61,8 +58,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Unauthorized: Wrong Token) @@ -76,8 +72,7 @@ GET Subscription - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Subscription @@ -93,8 +88,7 @@ POST Subscription Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscription.schema.json ${json} + Validate Json VnfIndicatorSubscription.schema.json ${result} Log Validation of VnfIndicatorSubscription OK POST Subscription - DUPLICATION @@ -111,8 +105,7 @@ POST Subscription - DUPLICATION Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfIndicatorSubscription.schema.json ${json} + Validate Json VnfIndicatorSubscription.schema.json ${result} Log Validation of VnfIndicatorSubscription OK POST Subscription - NO DUPLICATION diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index 863d818e87ff482d5eaaf8eaadbbdb5f9fe93f56..d5bc0453d75120a2c5214c119dc0efe43f2867c1 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -16,8 +16,7 @@ GET all Indicators Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET all Indicators - Filter @@ -30,8 +29,7 @@ GET all Indicators - Filter Should Contain ${contentType} application/json Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET all Indicators - Negative (wronge filter name) @@ -45,8 +43,7 @@ GET all Indicators - Negative (wronge filter name) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators - Negative (Unauthorized: Wrong Token) @@ -61,8 +58,7 @@ GET all Indicators - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators - Negative (Unauthorized: No Token) @@ -77,8 +73,7 @@ GET all Indicators - Negative (Unauthorized: No Token) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Indicators (Negative: Not found) @@ -92,8 +87,7 @@ GET all Indicators (Negative: Not found) Should Contain ${contentType} application/json Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all Indicators (Method not implemented) diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 2411f5c4e345423fa51f34ab6a86ca9a942351ab..de397433ab367f4f85d242f1b737e9a42990b0a2 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -16,8 +16,7 @@ GET Indicators on VNF Instance Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET Indicators on VNF Instance - Filter @@ -30,8 +29,7 @@ GET Indicators on VNF Instance - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfIndicators.schema.json ${json} + Validate Json vnfIndicators.schema.json ${result} Log Validation OK GET Indicators on VNF Instance - Negative Filter @@ -44,8 +42,7 @@ GET Indicators on VNF Instance - Negative Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Indicators on VNF Instance - Negative (Not Found) @@ -59,8 +56,7 @@ GET Indicators on VNF Instance - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Indicators on VNF Instance - (Method not implemented) diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index 6b18974989817f2f0686e60426a7fb3ef2c3901e..aef97a9e3ee5822bc0a1175937728e4858aea4b1 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -36,8 +36,7 @@ Post Cancel operation task Conflict Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Cancel operation task Not Found @@ -55,8 +54,7 @@ Post Cancel operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Cancel operation task - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 4d7c72434e495935718139c9b91b78e8030a8dae..83378f40ba0b67742933dd143d20fc00df4f0784 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -39,8 +39,7 @@ Change external VNF connectivity Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index 880d9c42a5d65a67c23870f4b3e112223f1f35ce..41f0c4e0abb0c8694f884d9bfcb3ce0ad5aec363 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -40,8 +40,7 @@ Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Change deployment flavour of a vnfInstance Conflict (parallel LCM operation) @@ -61,8 +60,7 @@ Change deployment flavour of a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -82,8 +80,7 @@ Change deployment flavour of a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index 2091e372803b8d10abfd0720b30aa5547fa2d981..97f8a0e181b0d8ca66acf9763bf647ba008edc25 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -38,8 +38,7 @@ Post Fail operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Fail operation task Conflict (parallel LCM operation) @@ -56,8 +55,7 @@ Post Fail operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -76,8 +74,7 @@ Post Fail operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Fail operation task - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot index cd01bf3b6cc2af4fc7650f4e2b246617b14b195d..bca73ce441164be00d8c6cb217adb2adb7052747 100644 --- a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot @@ -40,8 +40,7 @@ Heal a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Heal a vnfInstance Conflict (parallel LCM operation) @@ -61,8 +60,7 @@ Heal a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -82,8 +80,7 @@ Heal a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Heal VNFInstance - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot index 4edc625ec0167a8d77038240ef54b96e095f621e..40eea1d1810c59f68e13117a81f6870273ebe380 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -26,9 +26,8 @@ Get Information about an individual subscription Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Log Validate Status code Integer response status 200 - ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Subscription.schema.json ${json} + ${result}= Output response body + Validate Json Subscription.schema.json ${result} Log Validation OK PUT an individual subscription - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index b5eace21eecdc7adc076de9b99aac43e02c1235f..5c4545352d3f79a6189448c5be27072179b12377 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -38,8 +38,7 @@ Get Information about an individual VNF Instance ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstance.schema.json ${json} + Validate Json vnfInstance.schema.json ${result} Log Validation OK PUT Individual VNFInstance - Method not implemented @@ -85,8 +84,7 @@ PATCH Individual VNFInstance Precondition failed Log Validate Status code Integer response status 412 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PATCH Individual VNFInstance Conflict @@ -104,8 +102,7 @@ PATCH Individual VNFInstance Conflict Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -131,8 +128,7 @@ DELETE Individual VNFInstance Conflict Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK *** Keywords *** diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 888c4f92d18fdc934a1c29bdf25765f82eacfa78..b913ec5b8069afd9f59a54f7b221b477ab14f381 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -33,8 +33,7 @@ Get stauts information about multiple VNF instances ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfLcmOpOcc.schema.json ${json} + Validate Json VnfLcmOpOcc.schema.json ${result} Log Validation OK PUT stauts information about multiple VNF instances - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 2fbcc71e93621ca8e2556b71e13e1297fdc46c00..b58cb426842af5bd002339843ce5f23ce233c644 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -41,8 +41,7 @@ Instantiate a vnfInstance Conflict Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Instantiate VNFInstance - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index 5d78a40fbf4bbd7c90c989726a4ccae20f481d3c..8bcec88975fffa80ecd9257a313364e07aa509af 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -40,8 +40,7 @@ Operate a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Operate a vnfInstance Conflict (parallel LCM operation) @@ -61,8 +60,7 @@ Operate a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -82,8 +80,7 @@ Operate a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Operate VNFInstance - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index 190e7d2f56d4ad7e585751ed11bc671324df02bf..fe36b9b7ee56677bafddaa0eaf14240c0c0884dc 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -39,8 +39,7 @@ Post Retry operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Retry operation task Conflict (parallel LCM operation) @@ -58,8 +57,7 @@ Post Retry operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -78,8 +76,7 @@ Post Retry operation task Not Found Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Retry operation task - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index 17867df28974b7a0c140a626cecd0bc587a5c347..da7de32f3ffd0643e643f07e8aa5093b49d41200 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -38,8 +38,7 @@ Post Rollback operation task Conflict (Not-FAILED_TEMP) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Post Rollback operation task Conflict (parallel LCM operation) @@ -57,8 +56,7 @@ Post Rollback operation task Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -78,8 +76,7 @@ Post Rollback operation task Not Found Output response Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Rollback operation task - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot index 0c50cbcea49fc4895148e2c91ac43770d545ebcc..32a9c49ca0ad7d63e31274a48622f75d134a3e8a 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -39,8 +39,7 @@ Scale a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Scale a vnfInstance Conflict (parallel LCM operation) @@ -59,8 +58,7 @@ Scale a vnfInstance Conflict (parallel LCM operation) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -80,8 +78,7 @@ Scale a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Scale VNFInstance - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index fef240ad8e833d8bc149e0836e814aa2a6668fec..8ecce83d6490394e32cc5373a34a4c0d039543b5 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -39,8 +39,7 @@ Scale a vnfInstance to level Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Scale a vnfInstance to level Conflict (parallel LCM operation) @@ -58,8 +57,7 @@ Scale a vnfInstance to level Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished @@ -79,8 +77,7 @@ Scale a vnfInstance Not Found Integer response status 404 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index c13be834d4fa9c730ee06b8ea099feee7c0b90a7..a5c41a70afecde996fdf0997f0ab702093354907 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -22,8 +22,7 @@ Create a new subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Subscription.schema.json ${json} + Validate Json Subscription.schema.json ${result} Log Validation OK Create a new Subscription - DUPLICATION @@ -39,8 +38,7 @@ Create a new Subscription - DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Subscription.schema.json ${json} + Validate Json Subscription.schema.json ${result} Log Validation OK Create a new Subscription - NO-DUPLICATION @@ -67,8 +65,7 @@ GET Subscriptions Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Subscriptions.schema.json ${json} + Validate Json Subscriptions.schema.json ${result} Log Validation OK GET Subscription - Filter @@ -79,8 +76,7 @@ GET Subscription - Filter Integer response status 200 Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json Subscriptions.schema.json ${json} + Validate Json Subscriptions.schema.json ${result} Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters @@ -92,8 +88,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT subscriptions - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot index fe1a357a5ccc66054646a21562d3486223f68526..45aedcef35a1af62782e3d5cdf40c7f8d7b20070 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -40,8 +40,7 @@ Terminate a vnfInstance Conflict (Not-Instantiated) Integer response status 409 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Terminate a vnfInstance Conflict (parallel LCM operation) @@ -61,8 +60,7 @@ Terminate a vnfInstance Conflict (parallel LCM operation) Log Validate Status code Integer response status 409 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK [Teardown] #We cannot know if the "scale" operation is finished easily because the 202 indicates only whether the operation has been accepted, not whether the operation has been finished diff --git a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot index c1b61d05b38024041aaf9c7f6ae2dd80a871cb1f..f75258725cb7057f255b9b45cde97a1a1def23b3 100644 --- a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot @@ -54,8 +54,7 @@ Get information about multiple VNF instances ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfInstances.schema.json ${json} + Validate Json vnfInstances.schema.json ${result} Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters @@ -76,8 +75,7 @@ Get information about multiple VNF instances Bad Request Invalid attribute-based Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Get information about multiple VNF instances Bad Request Invalid attribute selector @@ -97,8 +95,7 @@ Get information about multiple VNF instances Bad Request Invalid attribute selec Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT VNFInstances - Method not implemented diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index ab10db01ef944647dfb7837b000e99ba20425dd0..bd01ef9169fb2f4edcf42c20157d26ec34ac2a58 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -18,8 +18,7 @@ Get Vnf Instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body}= Output response body - ${json}= evaluate json.loads('''${body}''') json - [Return] ${json} + [Return] ${body} Check HTTP Response Status Code Is [Arguments] ${expected_status} @@ -32,8 +31,7 @@ Check Operation Occurrence Id Check HTTP Response Body Json Schema Is [Arguments] ${schema} - ${json}= evaluate json.loads('''${response.body}''') json - Validate Json ${schema} ${json} + Validate Json ${schema} ${response.body} ${vnfInstanceId}= evaluate ${response.body.id} Log Json Schema Validation OK @@ -208,8 +206,7 @@ Create a new Grant - Synchronous mode ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json grant.schema.json ${json} + Validate Json grant.schema.json ${result} Log Validation OK Create a new Grant - Asynchronous mode diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index c77f50c493df820e194245ae4eb27692cb7cd887..2232d03e8ed7abd3107cd086739628eec3c7e553 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -28,8 +28,7 @@ Get stauts information about multiple VNF LCM OP OCC ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VnfLcmOpOccs.schema.json ${json} + Validate Json VnfLcmOpOccs.schema.json ${result} Log Validation OK Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute-based filtering parameters @@ -40,8 +39,7 @@ Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribu Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribute selector @@ -52,8 +50,7 @@ Get stauts information about multiple VNF LCM OP OCC Bad Request Invalid attribu Log Validate Status code Integer response status 400 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT stauts information about multiple VNF LCM OP OCC - Method not implemented diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index f1715ad4501e72ac1abc78237f2752dad50272f1..3abe49aa87ff3eb43d1f39071cbd02e6d4aae16d 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -66,8 +66,7 @@ Request a new Grant - Forbidden Integer response status 403 Log Status code validated ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Grants - Method not implemented @@ -136,8 +135,7 @@ Get an individual grant - Successful Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json grant.schema.json ${json} + Validate Json grant.schema.json ${result} Log Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index 21bf5587305e0c184f7a5214d909de9a7c5ee53b..6df60dccb58725688d82b57f9fe4299ad9a121fb 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -37,8 +37,7 @@ Get an individual grant - Successful ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json grant.schema.json ${json} + Validate Json grant.schema.json ${result} Log Validation OK Get an individual grant - Process ongoing @@ -73,8 +72,7 @@ Get an individual grant - grant rejected Log Validate Status code Integer response status 403 ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT an individual grant - Method not implemented diff --git a/SOL003/VNFPackageManagement-API/IndividualSubscription.robot b/SOL003/VNFPackageManagement-API/IndividualSubscription.robot index c474f154d835e1c608983e286c8d52212880d8db..658c840f6a0bb928ef405702cae6eceef60e50a7 100644 --- a/SOL003/VNFPackageManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFPackageManagement-API/IndividualSubscription.robot @@ -17,8 +17,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Negative (Not Found) @@ -32,8 +31,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Subscription @@ -62,8 +60,7 @@ DELETE Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT Subscription - (Method not implemented) diff --git a/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot index eb7d16f16c8720485a16ed5ef864841899315b06..db5402f17e0dc995ad31b0aca26f36aa51b7d37b 100644 --- a/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot @@ -16,8 +16,7 @@ GET Individual VNF Package Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${vnfPkgInfo}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfo}''') json - Validate Json vnfPkgInfo.schema.json ${json} + Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo} Log Validation OK GET Individual VNF Package - Negative (Not Found) @@ -31,8 +30,7 @@ GET Individual VNF Package - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Individual VNF Package - (Method not implemented) diff --git a/SOL003/VNFPackageManagement-API/Subscriptions.robot b/SOL003/VNFPackageManagement-API/Subscriptions.robot index 3fcda8b0a290190dc083cb18ca9a97fb5d428d13..7c64cc751daf840cab8b30b16b47fcabf1417200 100644 --- a/SOL003/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL003/VNFPackageManagement-API/Subscriptions.robot @@ -17,8 +17,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscriptions.schema.json ${json} + Validate Json PkgmSubscriptions.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Filter @@ -31,8 +30,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscriptions.schema.json ${json} + Validate Json PkgmSubscriptions.schema.json ${result} Log Validated PkgmSubscription schema GET Subscription - Negative Filter @@ -46,8 +44,7 @@ GET Subscription - Negative Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET Subscription - Negative (Not Found) @@ -61,8 +58,7 @@ GET Subscription - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Subscription @@ -78,8 +74,7 @@ POST Subscription Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validation of PkgmSubscription OK POST Subscription - DUPLICATION @@ -96,8 +91,7 @@ POST Subscription - DUPLICATION Should Contain ${headers} Location Log Response has header Location ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PkgmSubscription.schema.json ${json} + Validate Json PkgmSubscription.schema.json ${result} Log Validation of PkgmSubscription OK POST Subscription - NO DUPLICATION diff --git a/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot index f5f5975b39828a3ff250d07090134d29fa23a5c7..9715e1815863a837032871ce48033b556a541caf 100644 --- a/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot @@ -44,8 +44,7 @@ GET VNFD in Individual VNF Package - Negative (PLAIN/ZIP) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNFD in Individual VNF Package - Negative (Not Found) @@ -60,8 +59,7 @@ GET VNFD in Individual VNF Package - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNFD in Individual VNF Package - Negative (onboardingState issue) @@ -76,8 +74,7 @@ GET VNFD in Individual VNF Package - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNFD in Individual VNF Package (Method not implemented) diff --git a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot index 43de63defff38c3025cc18723066e3f08512bec0..3114908c9dbe7a169ee0b3741c7cdd528bab569a 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -48,8 +48,7 @@ GET VNF Package Artifact - Negative Range Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Artifact- Negative (Not Found) @@ -62,8 +61,7 @@ GET VNF Package Artifact- Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Artifact - Negative (onboardingState issue) @@ -76,8 +74,7 @@ GET VNF Package Artifact - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNF Package Artifact - (Method not implemented) diff --git a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot index 95c635b4fc6b7968bb60f0430295e71a15e53ead..45921870ca21ce6ce2e13f57d3ca75973d2c5637 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot @@ -53,8 +53,7 @@ GET VNF Package Content - Negative Range Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Content - Negative (Not Found) @@ -68,8 +67,7 @@ GET VNF Package Content - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET VNF Package Content - Negative (onboardingState issue) @@ -83,8 +81,7 @@ GET VNF Package Content - Negative (onboardingState issue) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST VNF Package Content - (Method not implemented) diff --git a/SOL003/VNFPackageManagement-API/VNFPackages.robot b/SOL003/VNFPackageManagement-API/VNFPackages.robot index c79cbfd436de60e4b512073e5d657ae03d5bbd5e..4e65ec2ce01e844a7983344fee99059d7c94735e 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackages.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackages.robot @@ -16,19 +16,18 @@ GET all Packages Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${result} Log Validation OK Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${result} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${result} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -42,8 +41,7 @@ GET all Packages - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${result} Log Validation OK GET all Packages - Negative (wronge filter name) @@ -57,8 +55,7 @@ GET all Packages - Negative (wronge filter name) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - Negative (Unauthorized: Wrong Token) @@ -73,8 +70,7 @@ GET all Packages - Negative (Unauthorized: Wrong Token) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - Negative (Unauthorized: No Token) @@ -88,8 +84,7 @@ GET all Packages - Negative (Unauthorized: No Token) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Packages - all_fields @@ -101,19 +96,18 @@ GET all Packages - all_fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${vnfPkgInfos} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -126,20 +120,19 @@ GET all Packages - exclude_default ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation OK Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted Log Checking missing information for _links element - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${vnfPkgInfos} $.._links Should Be Empty ${links} Log _links element is missing as excepted @@ -153,16 +146,15 @@ GET all Packages - fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Trying to validate response, checking vnfPkgInfo and other complex attributes included in the vnfPkgInfo - Validate Json vnfPkgsInfo.schema.json ${json} + Validate Json vnfPkgsInfo.schema.json ${vnfPkgInfos} Log Validation for vnfPkgInfo OK Log Trying to validate softwareImages schema - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Validate Json softwareImage.schema.json ${softwareImages[0]} Log Validation for softwareImage schema OK Log Trying to validate additionalArtifacts schema - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK @@ -176,13 +168,12 @@ GET all Packages - exclude_fields ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} ${vnfPkgInfos}= Output response body - ${json}= evaluate json.loads('''${vnfPkgInfos}''') json Log Checking missing information for softwareImages element - ${softwareImages}= Get Value From Json ${json} $..softwareImages + ${softwareImages}= Get Value From Json ${vnfPkgInfos} $..softwareImages Should Be Empty ${softwareImages} Log softwareImages element is missing as excepted Log Checking missing information for additionalArtifact element - ${additional_artifacts}= Get Value From Json ${json} $..additionalArtifacts + ${additional_artifacts}= Get Value From Json ${vnfPkgInfos} $..additionalArtifacts Should Be Empty ${additional_artifacts} Log additionalArtifact element is missing as excepted @@ -197,8 +188,7 @@ GET all PACKAGE (Negative: Not found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all PACKAGE (Method not implemented) diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index 797c251089da768300aec191aee9713d24a9a1f6..5bd4a1183ed5f51a74c8ac220885d009f5dd7afc 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -16,8 +16,7 @@ GET Individual PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK GET Individual PM Job - Negative (Not Found) @@ -31,8 +30,7 @@ GET Individual PM Job - Negative (Not Found) Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual PM Job @@ -52,8 +50,7 @@ DELETE Individual PM Job - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 62ef785e4471bc5a6dcac85afe8d153f361e8094..8ad137fbf073882d4c89c0bfd6dfd6915de57a6f 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -24,8 +24,7 @@ GET Report on Single PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate result with PerformanceReport schema ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PerformanceReport.schema.json ${json} + Validate Json PerformanceReport.schema.json ${result} GET Report on Single PM Job - Negative (Not Found) [Documentation] The client can use this method for reading an individual performance report. @@ -38,8 +37,7 @@ GET Report on Single PM Job - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Reports - (Method not implemented) diff --git a/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot index cfec146ab5384460d892fdb38257e63c4db90cda..da90422b5a5fa678b2544ff4a83577aae8dcc2b6 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot @@ -22,8 +22,7 @@ GET Individual Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema GET Individual Subscription - Negative (Not Found) @@ -39,8 +38,7 @@ GET Individual Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Individual Subscription - (Method not implemented) diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index 873aa463aa2d9901332d0cf6a77ee9ee9b4b1723..592f7b7ae252f02ab6bf52a1684f0748d663ccab 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -19,9 +19,8 @@ GET Individual Threshold ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} GET Individual Threshold - Negative (Not Found) [Documentation] The client can use this method to query information about thresholds. @@ -34,8 +33,7 @@ GET Individual Threshold - Negative (Not Found) Log Received 404 Not Found as expected Log Trying to validate ProblemDetails ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK DELETE Individual Threshold @@ -59,9 +57,8 @@ DELETE Individual Threshold - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} POST Individual Threshold - (Method not implemented) [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 526803738f194e575e1912670650f3f27a171198..4bf83d6ffd4c1535e2832c84c8d4c3aa208af948 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -18,11 +18,10 @@ GET all Pm Jobs Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -36,8 +35,7 @@ GET all Pm Jobs - Filter Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK GET all Pm Jobs - all_fields @@ -50,19 +48,18 @@ GET all Pm Jobs - all_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK Log Validating _links schema - ${links}= Get Value From Json ${json} $.._links + ${links}= Get Value From Json ${result} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -76,11 +73,10 @@ GET all Pm Jobs - exclude_default Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected @@ -95,15 +91,14 @@ GET all Pm Jobs - fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK @@ -118,15 +113,14 @@ GET all Pm Jobs - exclude_fields Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJobs.schema.json ${json} + Validate Json PmJobs.schema.json ${result} Log Validation OK Log Checking that reports element is missing - ${reports}= Get Value From Json ${json} $..reports + ${reports}= Get Value From Json ${result} $..reports Should Be Empty ${reports} Log Reports element is empty as expected Log Checking that criteria element is missing - ${criteria}= Get Value From Json ${json} $..criteria + ${criteria}= Get Value From Json ${result} $..criteria Should Be Empty ${criteria} Log Criteria element is empty as expected @@ -140,9 +134,8 @@ GET all Pm Jobs - Negative (wronge filter name) ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails - ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + ${problemDetails}= Output response body + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK GET all Pm Jobs (Negative: Not found) @@ -155,9 +148,8 @@ GET all Pm Jobs (Negative: Not found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate ProblemDetails - ${problemDetails}= Output response headers Content-Type - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + ${problemDetails}= Output response body + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST all PM Jobs - Create new PM Job @@ -173,8 +165,7 @@ POST all PM Jobs - Create new PM Job Should Contain ${contentType} ${CONTENT_TYPE_JSON} Log Trying to validate response ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmJob.schema.json ${json} + Validate Json PmJob.schema.json ${result} Log Validation OK PUT all PM Jobs - (Method not implemented) diff --git a/SOL003/VNFPerformanceManagement-API/PMJobsWithChecks.robot b/SOL003/VNFPerformanceManagement-API/PMJobsWithChecks.robot new file mode 100644 index 0000000000000000000000000000000000000000..9b6230d88ee0083ba7201443f4863aba7633370b --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/PMJobsWithChecks.robot @@ -0,0 +1,63 @@ +*** Setting *** +Resource environment/pmJobs.txt +Resource environment/IndividualPmJob.txt +Resource environment/variables.txt +Library OperatingSystem +Library BuiltIn +Library Collections +Library String +Library JSONSchemaLibrary schemas/ +Library JSONLibrary +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} + + + +*** Test Cases *** +Create PMJob + ${post_response} = Create PMJob + Validate Status Code ${post_response.status_code} 201 + Validate Header ${post_response.headers} Content-Type + Validate JsonSchema ${post_response.body} PmJob.schema.json + ${get_response}= Retrieve PMJob ${post_response.body.id} + Should Not Be Empty ${get_response} + Validate Status Code ${get_response.status_code} 200 + Should Be Equal ${post_response.body.id} ${get_response.body.id} + Validate Header ${get_response.headers} Content-Type + Validate JsonSchema ${get_response.body} PmJob.schema.json + + +*** Keywords *** +Create PMJob + Log Creating a new PM Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + ${body}= Get File jsons/CreatePmJobRequest.json + POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} + [Return] response + + +Validate Status Code + [Arguments] ${curr_status} ${exp_status} + Should Be Equal ${curr_status} ${exp_status} + Log Status code validated + + +Validate Header + [Arguments] ${headers} ${CONTENT_TYPE} + Should Contain ${headers} ${CONTENT_TYPE} + Log Header is present + + +Validate JsonSchema + [Arguments] ${body} ${schema} + Validate Json ${schema} ${body} + Log Validation OK + +Retrieve PMJob + [Arguments] ${pmJobId} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${pmJobId} + [Return] response diff --git a/SOL003/VNFPerformanceManagement-API/Subscriptions.robot b/SOL003/VNFPerformanceManagement-API/Subscriptions.robot index 4b850abd0243ba9f65bc9870576c8992bb251daa..170a6a77a8afb144b0e5048d8c8defeebc9f260b 100644 --- a/SOL003/VNFPerformanceManagement-API/Subscriptions.robot +++ b/SOL003/VNFPerformanceManagement-API/Subscriptions.robot @@ -22,8 +22,7 @@ GET Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Filter @@ -39,8 +38,7 @@ GET Subscription - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscriptions.schema.json ${json} + Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscription schema GET Subscription - Negative Filter (Erroneous filter) @@ -56,8 +54,7 @@ GET Subscription - Negative Filter (Erroneous filter) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema GET Subscription - Negative (Not Found) @@ -73,8 +70,7 @@ GET Subscription - Negative (Not Found) ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} Log Validated ProblemDetails schema POST Subscription @@ -97,8 +93,7 @@ POST Subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers @@ -152,8 +147,7 @@ POST Subscription - NO DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json PmSubscription.schema.json ${json} + Validate Json PmSubscription.schema.json ${result} Log Validated PmSubscription schema Log Trying to validate the Location header ${headers}= Output response headers diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index 1838eeea49fbe904693c9e90ff5c54a2d3728447..6e45a07033ed1a86cd8943ffbad87e56381b08af 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -19,9 +19,8 @@ GET Thresholds ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - Filter [Documentation] The client can use this method to query information about thresholds. @@ -34,9 +33,8 @@ GET Thresholds - Filter ${contentType}= Output response headers Content-Type Should Contain ${contentType} application/json ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with Threshold schema - Validate Json Thresholds.schema.json ${json} + Validate Json Thresholds.schema.json ${result} GET Thresholds - NEGATIVE Filter [Documentation] The client can use this method to query information about thresholds. @@ -47,9 +45,8 @@ GET Thresholds - NEGATIVE Filter GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} Integer response status 400 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with ProblemDetails schema - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${result} GET Thresholds - Negative (Not Found) [Documentation] The client can use this method to query information about thresholds. @@ -61,9 +58,8 @@ GET Thresholds - Negative (Not Found) Integer response status 404 Log Received 404 Not Found as expected ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json Log Trying to validate ProblemDetails - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK POST Reports @@ -78,9 +74,8 @@ POST Reports Integer response status 201 Log Received 201 Created as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json Log Trying to validate result with thresholds schema - Validate Json Threshold.schema.json ${json} + Validate Json Threshold.schema.json ${result} Log Trying to validate the Location header ${headers}= Output response headers Should Contain ${headers} Location diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot index 1bb3a6bfd98e8ef7f7fcee37d7ac93e23e688f23..321ee3b980ee97d0dea927af7091aa7c830d7534 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot @@ -34,8 +34,7 @@ Get Information about an individual subscription Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VrQuotaAvailSubscription.schema.json ${json} + Validate Json VrQuotaAvailSubscription.schema.json ${result} Log Validation OK PUT an individual subscription - Method not implemented diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index 2b7a4234eaf91c53aaf0a7bde80f160cebc27991..ce7294641f825b7ce22385d59598e20871cd823a 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -30,8 +30,7 @@ Create a new subscription ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VrQuotaAvailSubscription.schema.json ${json} + Validate Json VrQuotaAvailSubscription.schema.json ${result} Log Validation OK Create a new Subscription - DUPLICATION @@ -55,8 +54,7 @@ Create a new Subscription - DUPLICATION ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VrQuotaAvailSubscription.schema.json ${json} + Validate Json VrQuotaAvailSubscription.schema.json ${result} Log Validation OK Create a new Subscription - NO-DUPLICATION @@ -99,8 +97,7 @@ GET Subscriptions Log Validate Status code Integer response status 200 ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json subscriptions.schema.json ${json} + Validate Json subscriptions.schema.json ${result} Log Validation OK GET Subscription - Filter @@ -119,8 +116,7 @@ GET Subscription - Filter Integer response status 200 Log Received a 200 OK as expected ${result}= Output response body - ${json}= evaluate json.loads('''${result}''') json - Validate Json VrQuotaAvailSubscriptions.schema.json ${json} + Validate Json VrQuotaAvailSubscriptions.schema.json ${result} Log Validation OK GET subscriptions - Bad Request Invalid attribute-based filtering parameters @@ -141,8 +137,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ${contentType}= Output response headers Content-Type Should Contain ${contentType} ${CONTENT_TYPE} ${problemDetails}= Output response body - ${json}= evaluate json.loads('''${problemDetails}''') json - Validate Json ProblemDetails.schema.json ${json} + Validate Json ProblemDetails.schema.json ${problemDetails} Log Validation OK PUT subscriptions - Method not implemented