Loading SOL002/VNFConfiguration-API/Configuration.robot +1 −5 Original line number Diff line number Diff line *** Settings *** Resource environments/variables.txt Library REST ${VNF_SCHEMA}://${VNF_HOST}:${VNF_PORT} Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ... spec=SOL002-VNFConfiguration-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem Library DependencyLibrary *** Variables *** ${Etag}= an etag ${Etag_modified}= a modified etag *** Test Cases *** POST Configuration - Method not implemented log Trying to perform a POST. This method should not be implemented Loading SOL002/VNFConfiguration-API/environment/variables.txt +8 −37 Original line number Diff line number Diff line *** Variables *** ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNF_HOST} localhost # Hostname of the NFVO ${VNF_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${VNF_SCHEMA} https ${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== ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json ${apiRoot} / ${apiName} vnfconfig ${apiVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${alarm_filter} managedObjectId ${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c ${invalid_alarm_filter} badFilter ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${vnfInstanceDescription} description vnf ${vnfInstanceDescription_Update} Updated description vnf ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip ${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c ${ARTIFACT_TYPE} application/octet-stream ${ARTIFACT_ID} artifactId ${WRONG_ACCEPT} application/json ${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${CancelMode} GRACEFUL ${LccnSubscriptionRequest} {} ${NVFM_DUPLICATION} 0 ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notification_ep} /notification ${notification_port} 9091 ${AlarmNotification} {} ${AlarmClearedNotification} {} ${AlarmListRebuiltNotification} {} ${PerceivedSeverity} CRITICAL No newline at end of file ${Etag}= an etag ${Etag_modified}= a modified etag SOL002/VNFFaultManagement-API/IndividualAlarm.robot +0 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,6 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library DependencyLibrary *** Variables *** ${Etag}= an etag ${Etag_modified}= a modified etag *** Test Cases *** POST Alarm - Method not implemented Loading SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +13 −17 Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ Suite Teardown Terminate All Processes kill=true Library MockServerLibrary Library Process Library OperatingSystem Library REST ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} *** Variables *** ${sleep_interval} 20s *** Test Cases *** Deliver a notification - Alarm Loading @@ -16,75 +12,75 @@ 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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema 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_uri} Deliver a notification - Alarm Clearance log The POST method delivers a notification - Information of a VNF alarm. ${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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema 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_uri} Deliver a notification - Alarm List Rebuilt log The POST method delivers a notification - Information of a VNF alarm. ${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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema 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 Schema GET ${notification_ep} &{req}= Create Mock Request Matcher Schema GET ${callback_endpoint} &{rsp}= Create Mock Response Schema 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} Put ${callback_endpoint} Log Validate Status code Output response Integer response status 405 PATCH subscriptions - Method not implemented log Trying to perform a PATCH. This method should not be implemented Patch ${notification_ep} Patch ${callback_endpoint} Log Validate Status code Output response Integer response status 405 DELETE subscriptions - Method not implemented log Trying to perform a DELETE. This method should not be implemented Delete ${notification_ep} Delete ${callback_endpoint} Log Validate Status code Output response Integer response status 405 *** Keywords *** Create Sessions Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} #The API producer is set to NFVO according to SOL003-7.3.4 No newline at end of file Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4 No newline at end of file SOL002/VNFFaultManagement-API/Subscriptions.robot +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ Create a new subscription Create a new Subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM 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}"} Loading Loading
SOL002/VNFConfiguration-API/Configuration.robot +1 −5 Original line number Diff line number Diff line *** Settings *** Resource environments/variables.txt Library REST ${VNF_SCHEMA}://${VNF_HOST}:${VNF_PORT} Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ... spec=SOL002-VNFConfiguration-API.yaml Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem Library DependencyLibrary *** Variables *** ${Etag}= an etag ${Etag_modified}= a modified etag *** Test Cases *** POST Configuration - Method not implemented log Trying to perform a POST. This method should not be implemented Loading
SOL002/VNFConfiguration-API/environment/variables.txt +8 −37 Original line number Diff line number Diff line *** Variables *** ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNF_HOST} localhost # Hostname of the NFVO ${VNF_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${VNF_SCHEMA} https ${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== ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json ${apiRoot} / ${apiName} vnfconfig ${apiVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${alarm_filter} managedObjectId ${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c ${invalid_alarm_filter} badFilter ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${vnfInstanceDescription} description vnf ${vnfInstanceDescription_Update} Updated description vnf ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip ${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c ${ARTIFACT_TYPE} application/octet-stream ${ARTIFACT_ID} artifactId ${WRONG_ACCEPT} application/json ${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${CancelMode} GRACEFUL ${LccnSubscriptionRequest} {} ${NVFM_DUPLICATION} 0 ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notification_ep} /notification ${notification_port} 9091 ${AlarmNotification} {} ${AlarmClearedNotification} {} ${AlarmListRebuiltNotification} {} ${PerceivedSeverity} CRITICAL No newline at end of file ${Etag}= an etag ${Etag_modified}= a modified etag
SOL002/VNFFaultManagement-API/IndividualAlarm.robot +0 −3 Original line number Diff line number Diff line Loading @@ -8,9 +8,6 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library DependencyLibrary *** Variables *** ${Etag}= an etag ${Etag_modified}= a modified etag *** Test Cases *** POST Alarm - Method not implemented Loading
SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +13 −17 Original line number Diff line number Diff line Loading @@ -5,10 +5,6 @@ Suite Teardown Terminate All Processes kill=true Library MockServerLibrary Library Process Library OperatingSystem Library REST ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} *** Variables *** ${sleep_interval} 20s *** Test Cases *** Deliver a notification - Alarm Loading @@ -16,75 +12,75 @@ 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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema 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_uri} Deliver a notification - Alarm Clearance log The POST method delivers a notification - Information of a VNF alarm. ${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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_uri} body=${BODY} &{rsp}= Create Mock Response Schema 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_uri} Deliver a notification - Alarm List Rebuilt log The POST method delivers a notification - Information of a VNF alarm. ${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 Schema POST ${notification_ep} body=${BODY} &{req}= Create Mock Request Matcher Schema POST ${callback_endpoint} body=${BODY} &{rsp}= Create Mock Response Schema 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 Schema GET ${notification_ep} &{req}= Create Mock Request Matcher Schema GET ${callback_endpoint} &{rsp}= Create Mock Response Schema 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} Put ${callback_endpoint} Log Validate Status code Output response Integer response status 405 PATCH subscriptions - Method not implemented log Trying to perform a PATCH. This method should not be implemented Patch ${notification_ep} Patch ${callback_endpoint} Log Validate Status code Output response Integer response status 405 DELETE subscriptions - Method not implemented log Trying to perform a DELETE. This method should not be implemented Delete ${notification_ep} Delete ${callback_endpoint} Log Validate Status code Output response Integer response status 405 *** Keywords *** Create Sessions Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${notification_port} alias=mockInstance Start Process java -jar ../../bin/mockserver-netty-5.3.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${CONSUMER_SCHEMA}://${CONSUMER_HOST}:${notification_port} #The API producer is set to NFVO according to SOL003-7.3.4 No newline at end of file Create Mock Session ${callback_schema}://${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL003-7.3.4 No newline at end of file
SOL002/VNFFaultManagement-API/Subscriptions.robot +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ Create a new subscription Create a new Subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NVFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM 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}"} Loading