diff --git a/MEC021/SRV/AMS/AMSService.robot b/MEC021/SRV/AMS/AMSService.robot index 25ed72c2927516c9b76f9759b989403bf97ebabb..f37cd12d6deefd1a907745559c32078df7cc9a94 100644 --- a/MEC021/SRV/AMS/AMSService.robot +++ b/MEC021/SRV/AMS/AMSService.robot @@ -9,69 +9,124 @@ Library REST ${AMS_SCHEMA}://${AMS_HOST}:${AMS_PORT} ssl_verify=false Library BuiltIn Library OperatingSystem Library MockServerLibrary - - +Library Collections *** Test Cases *** -TC_MEC_MEC021_SRV_AMS_001_OK + +# Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services +TC_MEC_MEC021_SRV_AMS_001_OK_01 [Documentation] Request Registered AMS information ... Check that the AMS service returns information about the registered application mobility services when requested - ... ETSI GS MEC 021 2.0.8, clause 8.3.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS + + [Setup] Create two new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} ${APP_MOBILITY_SERVICE_ID2} ${APP_INS_ID} + Get Registered AMS information Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppMobilityServiceInfos + FOR ${app} IN @{response['body']} + ${passed_appMobilityServiceId} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + ${passed_appInstanceId} Run Keyword And Return Status Should Be Equal As Strings ${app['serviceConsumerId']['appInstanceId']} ${APP_INS_ID} + Exit For Loop If ${passed_appMobilityServiceId} and ${passed_appInstanceId} + END + + Should be True ${passed_appMobilityServiceId} + Should be True ${passed_appInstanceId} + + FOR ${app} IN @{response['body']} + ${passed_appMobilityServiceId} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID2} + ${passed_appInstanceId} Run Keyword And Return Status Should Be Equal As Strings ${app['serviceConsumerId']['appInstanceId']} ${APP_INS_ID} + Exit For Loop If ${passed_appMobilityServiceId} and ${passed_appInstanceId} + END + + Should be True ${passed_appMobilityServiceId} + Should be True ${passed_appInstanceId} + + [TearDown] Delete two specific AMS services ${APP_MOBILITY_SERVICE_ID} ${APP_MOBILITY_SERVICE_ID2} + +TC_MEC_MEC021_SRV_AMS_001_OK_02 + [Documentation] Request Registered AMS information + ... Check that the AMS service returns information about the registered application mobility services when requested + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml + [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS + + [Setup] Create two new application mobility service ${APP_MOBILITY_SERVICE_ID} ${APP_INS_ID} ${APP_MOBILITY_SERVICE_ID2} ${APP_INS_ID} + + Get Registered AMS information using attribute-selector filter ${APP_MOBILITY_SERVICE_FILTER} + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AppMobilityServiceInfos + + FOR ${app} IN @{response['body']} + ${passed_appMobilityServiceId} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + ${passed_appInstanceId} Run Keyword And Return Status Should Be Equal As Strings ${app['serviceConsumerId']['appInstanceId']} ${APP_INS_ID} + Exit For Loop If ${passed_appMobilityServiceId} and ${passed_appInstanceId} + END + + Should be True ${passed_appMobilityServiceId} + Should be True ${passed_appInstanceId} + + [TearDown] Delete two specific AMS services ${APP_MOBILITY_SERVICE_ID} ${APP_MOBILITY_SERVICE_ID2} + TC_MEC_MEC021_SRV_AMS_002_OK [Documentation] Request Registered AMS information using attribute-selector ... Check that the AMS service returns information about the registered application mobility services when requested - ... ETSI GS MEC 021 2.0.8, clause 8.3.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get Registered AMS information using attribute-selector appMobilityServiceId ${APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppMobilityServiceInfos - Check Result Contains ${response['body']['AppMobilityServiceInfo']} appMobilityServiceId ${APP_MOBILITY_SERVICE_ID} + FOR ${app} IN @{response['body']} + ${passed} Run Keyword And Return Status Should Be Equal As Strings ${app['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + Exit For Loop If ${passed} + END TC_MEC_MEC021_SRV_AMS_001_BR [Documentation] Request Registered AMS information using bad parameters ... Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters - ... ETSI GS MEC 021 2.0.8, clause 8.3.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.1 [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get Registered AMS information using bad parameters Check HTTP Response Status Code Is 400 - +# Post ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services TC_MEC_MEC021_SRV_AMS_003_OK [Documentation] Register a new application mobility services ... Check that the AMS service creates a new application mobility services when requested - ... ETSI GS MEC 021 2.0.8, clause 8.3.3.4 + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - Create a new application mobility service RegistrationInfo + Create a new application mobility service ${APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppMobilityServiceInfo - Log Checking Postcondition - Check Result Contains ${response['body']['AppMobilityServiceInfo']['registeredAppMobilityService']['serviceConsumerId']['']} appInstanceId ${APP_INS_ID} - + Should Be Equal As Strings ${response['body']['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} TC_MEC_MEC021_SRV_AMS_003_BR [Documentation] Register an UE Identity Tag using invalid parameter ... Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service - ... ETSI GS MEC 021 2.0.8, clause 8.3.3.4 + ... ETSI GS MEC 021 3.3.1, clause 8.3.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - Create a new application mobility service RegistrationInfoMalformed + Create a new application mobility service ${MALFORMED_APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 400 +# Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions TC_MEC_MEC021_SRV_AMS_004_OK [Documentation] Request Subscriptions List for the registered AMS services ... Check that the AMS service returns information about the available subscriptions when requested. ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription" - ... ETSI GS MEC 021 2.0.8, clause 8.6.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.6.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get Subscriptions for registered AMS Check HTTP Response Status Code Is 200 @@ -82,19 +137,22 @@ TC_MEC_MEC021_SRV_AMS_004_OK TC_MEC_MEC021_SRV_AMS_004_BR [Documentation] Request Subscription List for registered AMS Services using wrong attribute parameters ... Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + ... ETSI GS MEC 021 3.3.1, clause 8.6.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get Subscriptions for registered AMS with wrong attbirube parameter Check HTTP Response Status Code Is 400 - +# Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions TC_MEC_MEC021_SRV_AMS_005_OK [Documentation] Create a notification subscription ... Check that the AMS service creates a notification subscriptions when requested. ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription" - ... ETSI GS MEC 021 2.0.8, clause 8.6.3.4 + ... ETSI GS MEC 021 3.3.1, clause 8.6.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Post a new notification subscription NotificationSubscription Check HTTP Response Status Code Is 201 @@ -107,20 +165,22 @@ TC_MEC_MEC021_SRV_AMS_005_BR ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription" - ... ETSI GS MEC 021 2.0.8, clause 8.6.3.4 + ... ETSI GS MEC 021 3.3.1, clause 8.6.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Post a new notification subscription NotificationSubscriptionError Check HTTP Response Status Code Is 400 - +# Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${content} TC_MEC_MEC021_SRV_AMS_006_OK [Documentation] Request a specific subscription ... Check that the AMS service returns information about a given subscription when requested. ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription" - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get individual subscription for AMS services ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 @@ -131,19 +191,22 @@ TC_MEC_MEC021_SRV_AMS_006_OK TC_MEC_MEC021_SRV_AMS_006_NF [Documentation] Request a specific subscription using wrong identifier ... Check that the AMS service returns an error when receives a query about a not existing subscription - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.1 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get individual subscription for AMS services ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +# Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${identifier} TC_MEC_MEC021_SRV_AMS_007_OK [Documentation] Modify a specific subscription ... Check that the AMS service modifies a given subscription when requested. ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Update individual subscription for AMS services ${SUBSCRIPTION_ID} NotificationSubscription Check HTTP Response Status Code Is 200 @@ -157,7 +220,8 @@ TC_MEC_MEC021_SRV_AMS_007_BR ... Permitted SUBSCRIPTION_TYPE are: ... - MobilityProcedureSubscription ... - AdjacentAppInfoSubscription - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Update individual subscription for AMS services ${SUBSCRIPTION_ID} NotificationSubscriptionError Check HTTP Response Status Code Is 400 @@ -166,16 +230,19 @@ TC_MEC_MEC021_SRV_AMS_007_BR TP_MEC_MEC021_SRV_AMS_007_NF [Documentation] Modify a specific subscription using wrong identifier ... Check that the AMS service sends an error when it receives a modify request for a not existing subscription. - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Update individual subscription for AMS services ${NON_EXISTENT_SUBSCRIPTION_ID} NotificationSubscription Check HTTP Response Status Code Is 404 +# Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${content} TC_MEC_MEC021_SRV_AMS_008_OK [Documentation] Remove a specific subscription ... Check that the AMS service deletes a given subscription when requested - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.5 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.5 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Delete individual subscription for AMS services ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 @@ -184,28 +251,32 @@ TC_MEC_MEC021_SRV_AMS_008_OK TC_MEC_MEC021_SRV_AMS_008_NF [Documentation] Remove a specific subscription using wrong identifier ... Check that the AMS service sends an error when it receives a delete request for a not existing subscription - ... ETSI GS MEC 021 2.0.8, clause 8.7.3.5 + ... ETSI GS MEC 021 3.3.1, clause 8.7.3.5 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Delete individual subscription for AMS services ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 + TC_MEC_MEC021_SRV_AMS_009_OK [Documentation] Post Mobility Procedure Notification ... Check that the AMS service sends an AMS notification about a mobility procedure ... if the AMS service has an associated subscription and the event is generated - ... ETSI GS MEC 021 2.0.8, clause 7.4.2 + ... ETSI GS MEC 021 3.3.1, clause 7.4.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - ${json}= Get File schemas/MobilityProcedureNotification.schema.json - Log Creating mock request and response to handle Mobility Procedure Notification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} - &{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} + Log TBD +# ${json}= Get File schemas/MobilityProcedureNotification.schema.json +# Log Creating mock request and response to handle Mobility Procedure Notification +# &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} +# &{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} @@ -213,18 +284,20 @@ TC_MEC_MEC021_SRV_AMS_010_OK [Documentation] Post Adjacent Application Info Notification ... Check that the AMS service sends an AMS notification about adjacent application instances ... if the AMS service has an associated subscription and the event is generated - ... ETSI GS MEC 021 2.0.8, clause 7.4.3 + ... ETSI GS MEC 021 3.3.1, clause 7.4.3 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - ${json}= Get File schemas/AdjacentAppInfoNotification.schema.json - Log Creating mock request and response to handle Adjacent Application Info Notification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} - &{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} + Log TBD +# ${json}= Get File schemas/AdjacentAppInfoNotification.schema.json +# Log Creating mock request and response to handle Adjacent Application Info Notification +# &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} +# &{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} @@ -232,25 +305,28 @@ TC_MEC_MEC021_SRV_AMS_011_OK [Documentation] Post Expire Notification ... Check that the AMS service sends an AMS notification on subscription expiration ... if the AMS service has an associated subscription and the event is generated - ... ETSI GS MEC 021 2.0.8, clause 7.4.4 + ... ETSI GS MEC 021 3.3.1, clause 7.4.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS - ${json}= Get File schemas/ExpiryNotification.schema.json - Log Creating mock request and response to handle Expire Notification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} - &{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} - - - + Log TBD +# ${json}= Get File schemas/ExpiryNotification.schema.json +# Log Creating mock request and response to handle Expire Notification +# &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json} +# &{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} + + +# Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} TC_MEC_MEC021_SRV_AMS_012_OK [Documentation] Request a specific AMS service ... Check that the AMS service returns information about this individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get specific AMS service ${APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 200 @@ -262,21 +338,47 @@ TC_MEC_MEC021_SRV_AMS_012_NF [Documentation] Request a specific AMS Service using non existent identifier ... Check that the AMS service sends an error when receives a query about a not existing individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Get specific AMS service ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 404 - +# Put ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} TC_MEC_MEC021_SRV_AMS_013_OK [Documentation] Modify a specific AMS service ... Check that the AMS service modifies the individual application mobility service when requested ... ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Modify a specific AMS service ${APP_MOBILITY_SERVICE_ID} RegistrationInfo Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppMobilityServiceInfo - Check Result Contains ${response['registeredAppMobilityService']['serviceConsumerId']} appInstanceId ${APP_INS_ID} + Should Be Equal As Strings ${response['body']['appMobilityServiceId']} ${APP_MOBILITY_SERVICE_ID} + Should Be Equal As Strings ${response['body']['serviceConsumerId']['appInstanceId']} ${APP_MOBILITY_SERVICE_ID} # from req + #Check Result Contains ${response['registeredAppMobilityService']['serviceConsumerId']} appInstanceId ${APP_INS_ID} + +#ensure that { +# when { +# the IUT entity receives a vPUT containing +# uri indicating value "/amsi/v1/app_mobility_services/{APP_MOBILITY_SERVICE_ID_1}", +# body containing +# RegistrationInfo containing +# serviceConsumerId containing +# appInstanceId indicating value NEW_APP_INS_ID_NEW_1;;;; +# from the AMS_CLIENT entity +# } +# then { +# the IUT entity sends a HTTP_RESPONSE containing +# status set to "200 OK", +# body containing +# RegistrationInfo containing +# appMobilityServiceId indicating value APP_MOBILITY_SERVICE_ID_1, +# serviceConsumerId containing +# appInstanceId indicating value NEW_APP_INS_ID_NEW_1;;;; +# to the AMS_CLIENT entity +# } +#} @@ -284,6 +386,7 @@ TC_MEC_MEC021_SRV_AMS_013_NF [Documentation] Modify a specific AMS Service using non existent identifier ... Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Modify a specific AMS service ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} RegistrationInfo Check HTTP Response Status Code Is 404 @@ -293,16 +396,19 @@ TC_MEC_MEC021_SRV_AMS_013_BR [Documentation] Modify a specific AMS Service using bad parameters ... Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters ... ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Modify a specific AMS service ${APP_MOBILITY_SERVICE_ID} RegistrationInfoWithError Check HTTP Response Status Code Is 400 +# Delete ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} TC_MEC_MEC021_SRV_AMS_014_OK [Documentation] Remove a specific AMS service ... Check that the AMS service de-register the individual application mobility service and delete the resource ... that represents the individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Delete specific AMS service ${APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 204 @@ -313,16 +419,18 @@ TC_MEC_MEC021_SRV_AMS_014_NF ... Check that the AMS service sends an error when is requested to delete the resource ... that represents the individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Delete specific AMS service ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 404 - +# POST ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices/${amsId}/deregisterTask TC_MEC_MEC021_SRV_AMS_015_OK [Documentation] Request to deregister a specific AMS service ... Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service ... ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Deregister specific AMS service ${APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 204 @@ -333,6 +441,7 @@ TC_MEC_MEC021_SRV_AMS_015_NF [Documentation] Request to deregister a specific AMS service using non existent identifier ... Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service ... ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + ... Reference https://forge.etsi.org/rep/mec/gs021-amsi-api/-/blob/master/MEC021_AppMobilityService.yaml [Tags] PIC_AMS INCLUDE_UNDEFINED_SCHEMAS Deregister specific AMS service ${NON_EXISTENT_APP_MOBILITY_SERVICE_ID} Check HTTP Response Status Code Is 404 @@ -341,7 +450,7 @@ TC_MEC_MEC021_SRV_AMS_015_NF Get Registered AMS information Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices + Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services ${output}= Output response Set Suite Variable ${response} ${output} @@ -349,7 +458,7 @@ Get Registered AMS information using attribute-selector [Arguments] ${key} ${value} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices?${key}=${value} + Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services?${key}=${value} ${output}= Output response Set Suite Variable ${response} ${output} @@ -357,7 +466,7 @@ Get specific AMS service [Arguments] ${amsId} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices/${amsId} + Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -365,7 +474,7 @@ Get specific AMS service Get Registered AMS information using bad parameters Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices?appMobilityService=${APP_MOBILITY_SERVICE_ID} //param should be appMobilityServiceId + Get ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services?appMobilityService=${APP_MOBILITY_SERVICE_ID} #param should be appMobilityServiceId ${output}= Output response Set Suite Variable ${response} ${output} @@ -375,17 +484,29 @@ Modify a specific AMS service Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Put ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices/${amsId} ${content} + Put ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} ${content} ${output}= Output response Set Suite Variable ${response} ${output} - Delete specific AMS service [Arguments] ${amsId} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices/${amsId} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Delete two specific AMS services + [Arguments] ${amsId} ${amsId2} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId} + ${output}= Output response + Set Suite Variable ${response} ${output} + Set Headers {"Accept":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId2} ${output}= Output response Set Suite Variable ${response} ${output} @@ -395,22 +516,54 @@ Deregister specific AMS service Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - POST ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices/${amsId}/deregisterTask + POST ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services/${amsId}/deregisterTask ${output}= Output response Set Suite Variable ${response} ${output} Create a new application mobility service - [Arguments] ${content} + [Arguments] ${appMobilityServiceId} ${appInstanceId} Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - ${file}= Catenate SEPARATOR= json/ ${content} .json + ${file}= Catenate SEPARATOR= json/ RegistrationInfo .json ${body}= Get File ${file} - Post ${apiRoot}/${apiName}/${apiVersion}/appMobilityServices ${body} + ${json_data}= Evaluate json.loads('''${body}''') json + Set To Dictionary ${json_data} appMobilityServiceId=${appMobilityServiceId} + Set To Dictionary ${json_data['serviceConsumerId']} appInstanceId=${appInstanceId} + ${modified_json_string}= Evaluate json.dumps(${json_data}) + Post ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services ${modified_json_string} ${output}= Output response Set Suite Variable ${response} ${output} - + +Create two new application mobility service + [Arguments] ${appMobilityServiceId} ${appInstanceId} ${appMobilityServiceId2} ${appInstanceId2} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= json/ RegistrationInfo .json + ${body}= Get File ${file} + ${json_data}= Evaluate json.loads('''${body}''') json + Set To Dictionary ${json_data} appMobilityServiceId=${appMobilityServiceId} + Set To Dictionary ${json_data['serviceConsumerId']} appInstanceId=${appInstanceId} + ${modified_json_string}= Evaluate json.dumps(${json_data}) + Post ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services ${modified_json_string} + ${output}= Output response + Set Suite Variable ${response} ${output} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + ${file}= Catenate SEPARATOR= json/ RegistrationInfo .json + ${body}= Get File ${file} + ${json_data}= Evaluate json.loads('''${body}''') json + Set To Dictionary ${json_data} appMobilityServiceId=${appMobilityServiceId2} + Set To Dictionary ${json_data['serviceConsumerId']} appInstanceId=${appInstanceId2} + ${modified_json_string}= Evaluate json.dumps(${json_data}) + Post ${apiRoot}/${apiName}/${apiVersion}/app_mobility_services ${modified_json_string} + ${output}= Output response + Set Suite Variable ${response} ${output} + + Get Subscriptions for registered AMS Set Headers {"Accept":"application/json"} @@ -456,7 +609,7 @@ Delete individual subscription for AMS services [Arguments] ${content} Set Headers {"Accept":"application/json"} Set Headers {"Authorization":"${TOKEN}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${content} + Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${content} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/MEC021/SRV/AMS/environment/variables.txt b/MEC021/SRV/AMS/environment/variables.txt index ce533f359b3b49c6e1b1f7ed0e43b15c32a20c4b..51c72168d63e179f75682cbef1c01e9b16676605 100644 --- a/MEC021/SRV/AMS/environment/variables.txt +++ b/MEC021/SRV/AMS/environment/variables.txt @@ -6,11 +6,14 @@ ${AMS_PORT} 3006 ${response} {} ${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l ${apiRoot} -${apiName} +${apiName} amsi ${apiVersion} v1 # Specific variables -${APP_MOBILITY_SERVICE_ID} KtRGymNQ84dG3mQfRepa +${APP_MOBILITY_SERVICE_ID} APP_MOBILITY_SERVICE_ID +${APP_MOBILITY_SERVICE_ID2} APP_MOBILITY_SERVICE_ID2 +${MALFORMED_APP_MOBILITY_SERVICE_ID} MALFORMED_APP_MOBILITY_SERVICE_ID +${APP_MOBILITY_SERVICE_FILTER} (eq,appMobilityServiceId,APP_MOBILITY_SERVICE) ${APP_INS_ID} 5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f ${SUBSCRIPTION_TYPE} MobilityProcedureSubscription ${SUBSCRIPTION_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 diff --git a/MEC021/SRV/AMS/json/NotificationSubscription.json b/MEC021/SRV/AMS/json/NotificationSubscription.json new file mode 100644 index 0000000000000000000000000000000000000000..9c2ed02195d97b75b2a0d9e4c75f31912348447c --- /dev/null +++ b/MEC021/SRV/AMS/json/NotificationSubscription.json @@ -0,0 +1,16 @@ +{ + "callbackReference": "http://example.com/callback", + "requestTestNotification": true, + "websockNotifConfig": { + "websocketUri": "ws://example.com/websocket", + "requestWebsocketUri": true + }, + "expiryDeadline": { + "seconds": 1644691200, + "nanoSeconds": 0 + }, + "filterCriteria": { + "appInstanceId": "app-123" + }, + "subscriptionType": "AdjacentAppInfoSubscription" +} \ No newline at end of file diff --git a/MEC021/SRV/AMS/json/NotificationSubscriptionError.json b/MEC021/SRV/AMS/json/NotificationSubscriptionError.json new file mode 100644 index 0000000000000000000000000000000000000000..3c78fc9a3128a77d49041a8601dbd4eaeee8c1ca --- /dev/null +++ b/MEC021/SRV/AMS/json/NotificationSubscriptionError.json @@ -0,0 +1,16 @@ +{ + "callbackReference": "http://example.com/callback", + "requestTestNotification": true, + "websockNotifConfig": { + "websocketUri": "ws://example.com/websocket", + "requestWebsocketUri": true + }, + "expiryDeadline": { + "seconds": 1644691200, + "nanoSeconds": 0 + }, + "filterCriteria": { + "appInstanceId": "app-123" + }, + "subscriptionType": "INVALID_SUBSCRIPTION_TYPE" +} \ No newline at end of file diff --git a/MEC021/SRV/AMS/json/RegistrationInfo.json b/MEC021/SRV/AMS/json/RegistrationInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..ac38cbfb1997b8e5607d4a586a7cf7ce54409525 --- /dev/null +++ b/MEC021/SRV/AMS/json/RegistrationInfo.json @@ -0,0 +1,26 @@ +{ + "serviceConsumerId": { + "appInstanceId": "exampleAppInstanceId", + "mepId": "exampleMepId" + }, + "appMobilityServiceId": "exampleAppMobilityServiceId", + "deviceInformation": [ + { + "associateId": { + "type": "UE_IPv4_ADDRESS", + "value": "192.168.1.100" + }, + "appMobilityServiceLevel": "APP_MOBILITY_NOT_ALLOWED", + "contextTransferState": "NOT_TRANSFERRED" + }, + { + "associateId": { + "type": "UE_IPV6_ADDRESS", + "value": "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + }, + "appMobilityServiceLevel": "APP_MOBILITY_WITH_CONFIRMATION", + "contextTransferState": "USER_CONTEXT_TRANSFER_COMPLETED" + } + ], + "expiryTime": 3600 +} \ No newline at end of file diff --git a/MEC021/SRV/AMS/schemas/AppMobilityServiceInfo.schema.json b/MEC021/SRV/AMS/schemas/AppMobilityServiceInfo.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..2af27c6c50b818b6323bd084bac60b150a3f7b01 --- /dev/null +++ b/MEC021/SRV/AMS/schemas/AppMobilityServiceInfo.schema.json @@ -0,0 +1,99 @@ +{ + "title": "RegistrationInfo", + "required": [ + "serviceConsumerId" + ], + "type": "object", + "properties": { + "appMobilityServiceId": { + "type": "string", + "description": "The identifier of registered application mobility service. Shall be absent in POST requests, and present otherwise." + }, + "deviceInformation": { + "type": "array", + "items": { + "title": "RegistrationInfo.deviceInformation", + "required": [ + "associateId" + ], + "type": "object", + "properties": { + "associateId": { + "title": "AssociateId", + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "UE_IPv4_ADDRESS", + "UE_IPV6_ADDRESS", + "NATED_IP_ADDRESS", + "GTP_TEID" + ], + "type": "string", + "description": "Numeric value (0-255) corresponding to specified type of identifier", + "examples": [ + "UE_IPv4_ADDRESS" + ] + }, + "value": { + "type": "string", + "description": "Value for the identifier." + } + } + }, + "appMobilityServiceLevel": { + "title": "AppMobilityServiceLevel", + "enum": [ + "APP_MOBILITY_NOT_ALLOWED", + "APP_MOBILITY_WITH_CONFIRMATION", + "APP_MOBILITY_WITHOUT_CONFIRMATION" + ], + "type": "string", + "description": "This attribute provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host.", + "examples": [ + "APP_MOBILITY_NOT_ALLOWED" + ] + }, + "contextTransferState": { + "title": "contextTransferState", + "enum": [ + "NOT_TRANSFERRED", + "USER_CONTEXT_TRANSFER_COMPLETED" + ], + "type": "string", + "description": "If present, it represents the state of transferring the user context to another application instance.", + "examples": [ + "NOT_TRANSFERRED" + ] + } + } + }, + "description": "If present, it specifies the device served by the application instance which is registering is registering the Application Mobility Service." + }, + "expiryTime": { + "type": "integer", + "description": "If present, it indicates the time of Application Mobility Service expiration from the time of registration accepted.The value \"0\" means infinite time, i.e. no expiration.The unit of expiry time is one second.", + "contentEncoding": "int32" + }, + "serviceConsumerId": { + "title": "RegistrationInfo.serviceConsumerId", + "type": "object", + "properties": { + "appInstanceId": { + "type": "string", + "description": "If present, it represents the identifier of the application instance registering the Application Mobility Service." + }, + "mepId": { + "type": "string", + "description": "If present, it represents the identifier of the MEC platform registering the Application Mobility Service." + } + }, + "description": "The identifier of service consumer requesting the application mobility service, i.e. either the application instance ID or the MEC platform ID." + } + } + } \ No newline at end of file diff --git a/MEC021/SRV/AMS/schemas/AppMobilityServiceInfos.schema.json b/MEC021/SRV/AMS/schemas/AppMobilityServiceInfos.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..5a64a8e0beb03011fdfa76e9a339b0fec6769b64 --- /dev/null +++ b/MEC021/SRV/AMS/schemas/AppMobilityServiceInfos.schema.json @@ -0,0 +1,104 @@ +{ + "type": "array", + "items": { + "title": "RegistrationInfo", + "required": [ + "serviceConsumerId" + ], + "type": "object", + "properties": { + "appMobilityServiceId": { + "type": "string", + "description": "The identifier of registered application mobility service. Shall be absent in POST requests, and present otherwise." + }, + "deviceInformation": { + "type": "array", + "items": { + "title": "RegistrationInfo.deviceInformation", + "required": [ + "associateId" + ], + "type": "object", + "properties": { + "associateId": { + "title": "AssociateId", + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "UE_IPv4_ADDRESS", + "UE_IPV6_ADDRESS", + "NATED_IP_ADDRESS", + "GTP_TEID" + ], + "type": "string", + "description": "Numeric value (0-255) corresponding to specified type of identifier", + "examples": [ + "UE_IPv4_ADDRESS" + ] + }, + "value": { + "type": "string", + "description": "Value for the identifier." + } + } + }, + "appMobilityServiceLevel": { + "title": "AppMobilityServiceLevel", + "enum": [ + "APP_MOBILITY_NOT_ALLOWED", + "APP_MOBILITY_WITH_CONFIRMATION", + "APP_MOBILITY_WITHOUT_CONFIRMATION" + ], + "type": "string", + "description": "This attribute provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host.", + "examples": [ + "APP_MOBILITY_NOT_ALLOWED" + ] + }, + "contextTransferState": { + "title": "contextTransferState", + "enum": [ + "NOT_TRANSFERRED", + "USER_CONTEXT_TRANSFER_COMPLETED" + ], + "type": "string", + "description": "If present, it represents the state of transferring the user context to another application instance.", + "examples": [ + "NOT_TRANSFERRED" + ] + } + } + }, + "description": "If present, it specifies the device served by the application instance which is registering is registering the Application Mobility Service." + }, + "expiryTime": { + "type": "integer", + "description": "If present, it indicates the time of Application Mobility Service expiration from the time of registration accepted.The value \"0\" means infinite time, i.e. no expiration.The unit of expiry time is one second.", + "contentEncoding": "int32" + }, + "serviceConsumerId": { + "title": "RegistrationInfo.serviceConsumerId", + "type": "object", + "properties": { + "appInstanceId": { + "type": "string", + "description": "If present, it represents the identifier of the application instance registering the Application Mobility Service." + }, + "mepId": { + "type": "string", + "description": "If present, it represents the identifier of the MEC platform registering the Application Mobility Service." + } + }, + "description": "The identifier of service consumer requesting the application mobility service, i.e. either the application instance ID or the MEC platform ID." + } + } + }, + "description": "", + "contentMediaType": "application/json" + } \ No newline at end of file diff --git a/MEC021/SRV/AMS/schemas/MobilityProcedureNotification.schema.json b/MEC021/SRV/AMS/schemas/MobilityProcedureNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/MEC021/SRV/AMS/schemas/NotificationSubscription.schema.json b/MEC021/SRV/AMS/schemas/NotificationSubscription.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..59a81981897520f9fda7cf8cc45f0005e65ca1b5 --- /dev/null +++ b/MEC021/SRV/AMS/schemas/NotificationSubscription.schema.json @@ -0,0 +1,248 @@ +{ + "oneOf": [ + { + "title": "MobilityProcedureSubscription", + "required": [ + "filterCriteria", + "subscriptionType" + ], + "type": "object", + "properties": { + "_links": { + "title": "MobilityProcedureSubscription.links", + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "title": "LinkType", + "required": [ + "href" + ], + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URI referring to the subscription." + } + }, + "description": "'This data type represents a type of link'" + } + } + }, + "callbackReference": { + "type": "string", + "format": "uri", + "description": "URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response." + }, + "requestTestNotification": { + "type": "boolean", + "description": "Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, specified in ETSI GS MEC 009, as described in clause 6.12a." + }, + "websockNotifConfig": { + "description": "Provides details to negotiate and signal the use of a Websocket connection between AMS and the service consumer for notifications.", + "type": "object", + "properties": { + "websocketUri": { + "description": "Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications.", + "type": "string", + "format": "uri" + }, + "requestWebsocketUri": { + "type": "boolean", + "description": "Set to true by the service consumer to indicate that Websocket delivery is requested." + } + } + }, + "expiryDeadline": { + "description": "Identifies a boundary after which the subscription will expire.", + "title": "TimeStamp", + "required": [ + "seconds", + "nanoSeconds" + ], + "type": "object", + "properties": { + "seconds": { + "type": "integer", + "description": "'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'", + "contentEncoding": "int32" + }, + "nanoSeconds": { + "type": "integer", + "description": "'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'", + "contentEncoding": "int32" + } + } + }, + "filterCriteria": { + "title": "MobilityProcedureSubscription.filterCriteria", + "type": "object", + "properties": { + "appInstanceId": { + "type": "string", + "description": "Identifier of the application instance that registers the Application Mobility Service." + }, + "associateId": { + "type": "array", + "items": { + "title": "AssociateId", + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "title": "Type", + "enum": [ + "UE_IPv4_ADDRESS", + "UE_IPV6_ADDRESS", + "NATED_IP_ADDRESS", + "GTP_TEID" + ], + "type": "string", + "description": "Numeric value (0-255) corresponding to specified type of identifier", + "examples": [ + "UE_IPv4_ADDRESS" + ] + }, + "value": { + "type": "string", + "description": "Value for the identifier." + } + } + }, + "description": "0 to N identifiers to associate the information for specific UE(s) and flow(s)." + }, + "mobilityStatus": { + "type": "array", + "items": { + "title": "MobilityStatus", + "enum": [ + "INTERHOST_MOVEOUT_TRIGGERED", + "INTERHOST_MOVEOUT_COMPLETED", + "INTERHOST_MOVEOUT_FAILED" + ], + "type": "string", + "description": "Indicate the status of the UE mobility", + "examples": [ + "INTERHOST_MOVEOUT_TRIGGERED" + ] + }, + "description": "In case mobilityStatus is not included in the subscription request, the default value 1 = INTER_HOST_MOBILITY_TRIGGERED shall be used and included in the response." + } + }, + "description": "List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response." + }, + "subscriptionType": { + "const": "MobilityProcedureSubscription", + "type": "string", + "description": "Shall be set to \"MobilityProcedureSubscription\".", + "examples": [ + "MobilityProcedureSubscription" + ] + } + } + }, + { + "title": "AdjacentAppInfoSubscription", + "required": [ + "callbackReference", + "filterCriteria", + "subscriptionType" + ], + "type": "object", + "properties": { + "_links": { + "title": "AdjacentAppInfoSubscription.links", + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "title": "LinkType", + "required": [ + "href" + ], + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URI referring to the subscription." + } + }, + "description": "'This data type represents a type of link'" + } + }, + "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests." + }, + "callbackReference": { + "type": "string", + "format": "uri", + "description": "URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response." + }, + "requestTestNotification": { + "type": "boolean", + "description": "Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, specified in ETSI GS MEC 009, as described in clause 6.12a." + }, + "websockNotifConfig": { + "type": "object", + "properties": { + "websocketUri": { + "description": "Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications.", + "type": "string", + "format": "uri" + }, + "requestWebsocketUri": { + "type": "boolean", + "description": "Set to true by the service consumer to indicate that Websocket delivery is requested." + } + } + }, + "expiryDeadline": { + "description": "Identifies a boundary after which the subscription will expire.", + "title": "TimeStamp", + "required": [ + "seconds", + "nanoSeconds" + ], + "type": "object", + "properties": { + "seconds": { + "type": "integer", + "description": "'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'", + "contentEncoding": "int32" + }, + "nanoSeconds": { + "type": "integer", + "description": "'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'", + "contentEncoding": "int32" + } + } + }, + "filterCriteria": { + "title": "AdjacentAppInfoSubscription.filterCriteria", + "type": "object", + "properties": { + "appInstanceId": { + "type": "string" + } + }, + "description": "List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response." + }, + "subscriptionType": { + "const": "AdjacentAppInfoSubscription", + "type": "string", + "description": "Shall be set to \"AdjacentAppInfoSubscription\".", + "examples": [ + "AdjacentAppInfoSubscription" + ] + } + } + } + ], + "contentMediaType": "application/json" +} \ No newline at end of file diff --git a/MEC021/SRV/AMS/schemas/SubscriptionLinkList.schema.json b/MEC021/SRV/AMS/schemas/SubscriptionLinkList.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..6c29b446848105849c7b5efa90dfcb15a78c24ef --- /dev/null +++ b/MEC021/SRV/AMS/schemas/SubscriptionLinkList.schema.json @@ -0,0 +1,64 @@ +{ + "title": "SubscriptionLinkList", + "required": [ + "_links" + ], + "type": "object", + "properties": { + "_links": { + "description": "Hyperlinks related to the resource.", + "title": "SubscriptionLinkList.links", + "required": [ + "self" + ], + "type": "object", + "properties": { + "self": { + "description": "URI of this resource.", + "title": "LinkType", + "required": [ + "href" + ], + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URI referring to the subscription." + } + } + }, + "subscription": { + "type": "array", + "description": "The service consumer’s subscriptions.", + "items": { + "title": "SubscriptionLinkList.subscription", + "required": [ + "href", + "subscriptionType" + ], + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URI referring to the subscription." + }, + "subscriptionType": { + "description": "The Subscription Type", + "title": "subscriptionType", + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "examples": [ + 0 + ] + } + } + } + } + } + } + } +} \ No newline at end of file