Loading tests/features/CAPIF Api Events/capif_events_api.robot +34 −12 Original line number Diff line number Diff line Loading @@ -171,8 +171,8 @@ Invoker receives Service API Invocation events ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -243,8 +243,8 @@ Invoker subscribe to Service API Available and Unavailable events ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -313,8 +313,8 @@ Invoker subscribe to Service API Update ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -357,7 +357,7 @@ Provider subscribe to API Invoker events ${events_list}= Create List API_INVOKER_ONBOARDED API_INVOKER_UPDATED API_INVOKER_OFFBOARDED ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading @@ -377,7 +377,7 @@ Provider subscribe to API Invoker events ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_new_callback Set To Dictionary ... ${request_body} ... notificationDestination=${new_notification_destination} ... notification_destination=${new_notification_destination} ${resp}= Put Request Capif ... ${url.path} ... ${request_body} Loading @@ -387,7 +387,7 @@ Provider subscribe to API Invoker events # Check Update Check Response Variable Type And Values ${resp} 200 APIInvokerEnrolmentDetails ... notificationDestination=${new_notification_destination} ... notification_destination=${new_notification_destination} # Remove Invoker from CCF ${resp}= Delete Request Capif Loading Loading @@ -432,7 +432,7 @@ Invoker subscribed to ACL update event ${events_list}= Create List ACCESS_CONTROL_POLICY_UPDATE ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -516,7 +516,7 @@ Provider receives an ACL unavailable event when invoker remove Security Context. ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -590,7 +590,7 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE API_INVOKER_AUTHORIZATION_REVOKED ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -651,6 +651,28 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ## Check Events Expected towards received notifications at mock server Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Creates a new individual CAPIF Event Subscription without supported features attribute [Tags] capif_api_events-13 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding ${request_body}= Create Events Subscription supported_features=${NONE} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} # Check Results Check Response Variable Type And Values ... ${resp} ... 400 ... ProblemDetails ... title=Bad Request ... status=400 ... detail=supportedFeatures not present in request ... cause=supportedFeatures not present *** Keywords *** Create Events From InvocationLogs Loading tests/libraries/api_events/bodyRequests.py +12 −12 Original line number Diff line number Diff line def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notificationDestination="http://robot.testing", eventFilters=None, eventReq=None, requestTestNotification=None, supportedFeatures=None, websockNotifConfig=None): def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notification_destination="http://robot.testing", event_filters=None, event_req=None, request_test_notification=None, supported_features="0", websock_notif_config=None): event_subscription = { "events": events, "notificationDestination": notificationDestination, "notificationDestination": notification_destination, } if eventFilters != None: event_subscription['eventFilters'] = eventFilters if eventReq != None: event_subscription['eventReq'] = eventReq if requestTestNotification != None: event_subscription['requestTestNotification'] = requestTestNotification if supportedFeatures != None: event_subscription['supportedFeatures'] = supportedFeatures if websockNotifConfig != None: event_subscription['websockNotifConfig'] = websockNotifConfig if event_filters != None: event_subscription['eventFilters'] = event_filters if event_req != None: event_subscription['eventReq'] = event_req if request_test_notification != None: event_subscription['requestTestNotification'] = request_test_notification if supported_features != None: event_subscription['supportedFeatures'] = supported_features if websock_notif_config != None: event_subscription['websockNotifConfig'] = websock_notif_config return event_subscription Loading Loading
tests/features/CAPIF Api Events/capif_events_api.robot +34 −12 Original line number Diff line number Diff line Loading @@ -171,8 +171,8 @@ Invoker receives Service API Invocation events ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -243,8 +243,8 @@ Invoker subscribe to Service API Available and Unavailable events ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -313,8 +313,8 @@ Invoker subscribe to Service API Update ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... eventFilters=${event_filters} ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ... event_filters=${event_filters} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} Loading Loading @@ -357,7 +357,7 @@ Provider subscribe to API Invoker events ${events_list}= Create List API_INVOKER_ONBOARDED API_INVOKER_UPDATED API_INVOKER_OFFBOARDED ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading @@ -377,7 +377,7 @@ Provider subscribe to API Invoker events ... http://${CAPIF_CALLBACK_IP}:${CAPIF_CALLBACK_PORT}/netapp_new_callback Set To Dictionary ... ${request_body} ... notificationDestination=${new_notification_destination} ... notification_destination=${new_notification_destination} ${resp}= Put Request Capif ... ${url.path} ... ${request_body} Loading @@ -387,7 +387,7 @@ Provider subscribe to API Invoker events # Check Update Check Response Variable Type And Values ${resp} 200 APIInvokerEnrolmentDetails ... notificationDestination=${new_notification_destination} ... notification_destination=${new_notification_destination} # Remove Invoker from CCF ${resp}= Delete Request Capif Loading Loading @@ -432,7 +432,7 @@ Invoker subscribed to ACL update event ${events_list}= Create List ACCESS_CONTROL_POLICY_UPDATE ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -516,7 +516,7 @@ Provider receives an ACL unavailable event when invoker remove Security Context. ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -590,7 +590,7 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ${events_list}= Create List ACCESS_CONTROL_POLICY_UNAVAILABLE API_INVOKER_AUTHORIZATION_REVOKED ${request_body}= Create Events Subscription ... events=@{events_list} ... notificationDestination=${NOTIFICATION_DESTINATION_URL}/testing ... notification_destination=${NOTIFICATION_DESTINATION_URL}/testing ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_provider['amf_id']}/subscriptions ... json=${request_body} Loading Loading @@ -651,6 +651,28 @@ Invoker receives an Invoker Authorization Revoked and ACL unavailable event when ## Check Events Expected towards received notifications at mock server Wait Until Keyword Succeeds 5x 5s Check Mock Server Notification Events ${events_expected} Creates a new individual CAPIF Event Subscription without supported features attribute [Tags] capif_api_events-13 smoke # Default Invoker Registration and Onboarding ${register_user_info_invoker} ${url} ${request_body}= Invoker Default Onboarding ${request_body}= Create Events Subscription supported_features=${NONE} ${resp}= Post Request Capif ... /capif-events/v1/${register_user_info_invoker['api_invoker_id']}/subscriptions ... json=${request_body} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} # Check Results Check Response Variable Type And Values ... ${resp} ... 400 ... ProblemDetails ... title=Bad Request ... status=400 ... detail=supportedFeatures not present in request ... cause=supportedFeatures not present *** Keywords *** Create Events From InvocationLogs Loading
tests/libraries/api_events/bodyRequests.py +12 −12 Original line number Diff line number Diff line def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notificationDestination="http://robot.testing", eventFilters=None, eventReq=None, requestTestNotification=None, supportedFeatures=None, websockNotifConfig=None): def create_events_subscription(events=["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"], notification_destination="http://robot.testing", event_filters=None, event_req=None, request_test_notification=None, supported_features="0", websock_notif_config=None): event_subscription = { "events": events, "notificationDestination": notificationDestination, "notificationDestination": notification_destination, } if eventFilters != None: event_subscription['eventFilters'] = eventFilters if eventReq != None: event_subscription['eventReq'] = eventReq if requestTestNotification != None: event_subscription['requestTestNotification'] = requestTestNotification if supportedFeatures != None: event_subscription['supportedFeatures'] = supportedFeatures if websockNotifConfig != None: event_subscription['websockNotifConfig'] = websockNotifConfig if event_filters != None: event_subscription['eventFilters'] = event_filters if event_req != None: event_subscription['eventReq'] = event_req if request_test_notification != None: event_subscription['requestTestNotification'] = request_test_notification if supported_features != None: event_subscription['supportedFeatures'] = supported_features if websock_notif_config != None: event_subscription['websockNotifConfig'] = websock_notif_config return event_subscription Loading