diff --git a/SOL005/NSDManagement-API/NSDManagementNotification.robot b/SOL005/NSDManagement-API/NSDManagementNotification.robot index 9b01a0062cdbd3937a6b69ed8a766f79f9695004..8d522a6ca24cd89129b219e33c429284fadbdd8a 100644 --- a/SOL005/NSDManagement-API/NSDManagementNotification.robot +++ b/SOL005/NSDManagement-API/NSDManagementNotification.robot @@ -294,163 +294,6 @@ Configure Notification Forward &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} - -Check Notification Endpoint - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} - -Post NSD Change Notification - ${json}= Get File schemas/NsdChangeNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle NSD Change Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -Post NSD Deletion Notification - ${json}= Get File schemas/NsdDeletionNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle NSD Deletion Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -Post NSD Onboard Failure Notification - ${json}= Get File schemas/NsdOnboardingFailureNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle NSD Onboard Failure Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -Post NSD Onboard Notification - ${json}= Get File schemas/NsdOnboardingNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle NSD Onboard Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -Post PNFD Deletion Notification - ${json}= Get File schemas/PnfdDeletionNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle PNFD Deletion Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -Post PNFD Onboard Failure Notification - ${json}= Get File schemas/PNFDOnboardingFailureNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle PNFD Onboard Failure Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -Post PNFD Onboard Notification - ${json}= Get File schemas/PNFDOnboardingNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle NSD Onboard Notification - &{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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -Post Notification Negative 404 - ${json}= Get File schemas/ProblemDetails.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle Notification to handle 404 error - &{req}= Create Mock Request Matcher POST ${callback_endpoint_error} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=404 - Create Mock Expectation ${req} ${rsp} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -PUT VNF Package Management Notification - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -PATCH VNF Package Management Notification - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - 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} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - - -DELETE VNF Package Management Notification - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Log PATCH Method not implemented - &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req} - 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 Wait For Process handle=mockInstance timeout=5s on_timeout=continue