From 30d3f8ad0d4a67fc353e8dc4f5d6aa4f49aaab03 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Fri, 9 Aug 2019 14:34:22 +0200 Subject: [PATCH] Initial commit on MEC021 --- ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn | 544 +++++++++++++++++ .../Ams/ttcn/Ams_EncdecDeclarations.ttcn | 33 + ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn | 8 + ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn | 21 + ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn | 337 +++++++++++ ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn | 572 ++++++++++++++++++ ttcn/LibMec/ttcn/LibMec_Pics.ttcn | 2 + ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 5 + .../LibItsHttp_JsonMessageBodyTypes.ttcn | 6 + .../LibItsHttp_JsonTemplates.ttcn | 442 ++++++++------ 10 files changed, 1781 insertions(+), 189 deletions(-) create mode 100644 ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn create mode 100644 ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn create mode 100644 ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn create mode 100644 ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn create mode 100644 ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn create mode 100644 ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn new file mode 100644 index 0000000..4b325b3 --- /dev/null +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -0,0 +1,544 @@ +/** +* @author ETSI / STF569 +* @version $URL:$ +* $ID:$ +* @desc This module provides the MEC test cases. +* @copyright ETSI Copyright Notification +* No part may be reproduced except as authorized by written permission. +* The copyright and the foregoing restriction extend to reproduction in all media. +* All rights reserved. +* @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) +*/ +module AtsMec_Ams_TestCases { + +// Libcommon +import from LibCommon_Sync all; + +// LibHttp +import from LibItsHttp_TypesAndValues all; +import from LibItsHttp_Functions all; +import from LibItsHttp_Templates all; +import from LibItsHttp_JsonTemplates all; +import from LibItsHttp_TestSystem all; + +// LibMec_LocationAPI +import from Ams_Templates all; +import from Ams_Pics all; +import from Ams_Pixits all; + +// LibMec +import from LibMec_Functions all; +import from LibMec_Pics all; +import from LibMec_Pixits all; + + +group appMobilityServices { + + testcase TP_MEC_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info( + { + *, + mw_app_mobility_service_info(PX_APP_MOBILITY_SERVICE_ID) + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + + + + testcase TP_MEC_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + { + -, -, 400 + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + + testcase TP_MEC_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request( + m_registration_request({ + m_service_consumer_id(PX_APP_INS_IP, *), + *, + * + } + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info( + { + mw_registration_info({ + mw_service_consumer_id(PX_APP_INS_ID, *), + *, + * + }), + * + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + +testcase TP_MEC_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request( + m_registration_request({ + m_service_consumer(PX_APP_INS_IP, *), + *, + * + } + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + { + -, -, 400 + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + +} + +group appMobilityServicesSubscriptions { + + testcase TP_MEC_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & X_ME_APP_AMS_SUBS & "?subscriptionType=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription(PX_SUBSCRIPTION_TYPE, *, *, *, *) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + + testcase TP_MEC_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & X_ME_APP_AMS_SUBS & "?subscriptionTyp=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + { + -, -, 400 + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + + testcase TP_MEC_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & X_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions({ + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + *, + *, + * + ) + }) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + *, + *, + * + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + +testcase TP_MEC_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & X_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription_error({ + PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, *, *, * + } + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + { + -, -, 400 + } + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } + + +} + + +} // End of module AtsMec_Ams_TestCases diff --git a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn new file mode 100644 index 0000000..0b6653c --- /dev/null +++ b/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn @@ -0,0 +1,33 @@ +module Ams_EncdecDeclarations { + + import from Ams_TypesAndValues all; + + external function enc_AppMobilityServiceInfo(in AppMobilityServiceInfo p_app_mobility_service_info) return octetstring + with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; + external function dec_AppMobilityServiceInfo(in octetstring p_pdu) return AppMobilityServiceInfo + with { extension "prototype (convert) decode(JSON)" }; + + external function enc_RegistrationRequest(in RegistrationRequest p_registration_request) return octetstring + with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; + external function dec_RegistrationRequest(in octetstring p_pdu) return RegistrationRequest + with { extension "prototype (convert) decode(JSON)" }; + + + external function enc_RegistrationInfo(in RegistrationInfo p_registration_info) return octetstring + with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; + external function dec_Registrationinfo(in octetstring p_pdu) return RegistrationInfo + with { extension "prototype (convert) decode(JSON)" }; + + + external function enc_SubscriptionLink(in SubscriptionLink p_subscription_link) return octetstring + with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; + external function dec_SubscriptionLinks(in octetstring p_pdu) return SubscriptionLinks + with { extension "prototype (convert) decode(JSON)" }; + + + external function enc_NotificationSubscription(in NotificationSubscription p_notification_subscription) return octetstring + with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; + external function dec_NotificationSubscription(in octetstring p_pdu) return NotificationSubscription + with { extension "prototype (convert) decode(JSON)" }; + +} // End of module LocationAPI_EncdecDeclarations diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn new file mode 100644 index 0000000..89089fa --- /dev/null +++ b/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn @@ -0,0 +1,8 @@ +module Ams_Pics { + + /** + * @desc Does the IUT support LocationAPI? + */ + modulepar boolean PICS_AMS_API_SUPPORTED := true; + +} // End of module LocationAPI_Pics diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn new file mode 100644 index 0000000..42134f7 --- /dev/null +++ b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn @@ -0,0 +1,21 @@ +module Ams_Pixits { + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LocationAPI + import from Ams_TypesAndValues all; + + modulepar charstring PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa" + + modulepar charstring PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + + modulepar charstring PX_SUBSCRIPTION_TYPE := "MobilityProcedureSubscription" + + modulepar charstring PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" + + modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" + + modulepar charstring PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback" + +} // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn new file mode 100644 index 0000000..974f2d7 --- /dev/null +++ b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn @@ -0,0 +1,337 @@ +module Ams_Templates { + + // JSON + import from JSON all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LocationAPI + import from Ams_TypesAndValues all; + import from Ams_Pixits all; + + template (value) AppMobilityServiceInfo m_app_mobility_service_info( + in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, + in template (omit) RegistrationInfos p_registration_info := omit + ) := { + appMobilityServiceId := p_app_mobility_service_id, + registeredAppMobilityService := p_registration_info + } // End of template m_app_mobility_service_info + + + template (present) AppMobilityServiceInfo mw_app_mobility_service_info( + template (present) RegistrationInfos p_registration_info := omit, + in String p_app_mobility_service_id + ) := { + appMobilityServiceId := p_app_mobility_service_id, + registeredAppMobilityService := p_registration_info + } + + + + template (value) RegistrationRequest m_registration_request ( + in template (omit) ServiceConsumerId p_service_consumer_id := omit, + in template (omit) DeviceInformations p_device_info := omit, + in UInt32 p_expire_time + ) := { + serviceConsumerId := p_service_consumer_id, + deviceInformation := p_device_info, + expiryTime := p_expire_time + } + + template (present) RegistrationRequest mw_registration_request ( + in template (present) ServiceConsumerId p_service_consumer_id := omit, + in template (present) DeviceInformations p_device_info := omit, + in UInt32 p_expire_time := omit + ) := { + serviceConsumerId := p_service_consumer_id, + deviceInformation := omit, + expiryTime := omit + } + + + template (value) RegistrationInfo m_registration_info ( + in template (omit) ServiceConsumerId p_service_consumer_id := omit, + in template (omit) DeviceInformations p_device_info := omit, + in UInt32 p_expire_time + ) := { + serviceConsumerId := p_service_consumer_id, + deviceInformation := p_device_info, + expiryTime := p_expire_time + } + + template (present) RegistrationInfo mw_registration_info ( + in template (present) ServiceConsumerId p_service_consumer_id := omit, + in template (present) DeviceInformations p_device_info := omit, + in UInt32 p_expire_time + ) := { + serviceConsumerId := p_service_consumer_id, + deviceInformation := omit, + expiryTime := p_expire_time + } + + + template (value) ServiceConsumer m_service_consumer ( + in String p_app_instance, + in String p_mep_id + ) := { + appInstance := p_app_instance, + mepId := p_mep_id + } + + + template (value) ServiceConsumerId m_service_consumer_id ( + in String p_app_instance_id, + in String p_mep_id + ) := { + appInstanceId := p_app_instance_id, + mepId := p_mep_id + } + + + + template (omit) ServiceConsumerId mw_service_consumer_id ( + in String p_app_instance_id, + in String p_mep_id + ) := { + appInstanceId := omit, + mepId := omit + } + + + + template (value) DeviceInformation m_device_info ( + in String p_associate_id + ) := { + associateId := p_associate_id + } + + template (omit) DeviceInformation mw_device_info ( + in String p_associate_id + ) := { + associateId := p_associate_id + } + + + template (value) MobilityProcedureSubscription m_ams_subscription ( + in SubscriptionType p_subscriptionType, + in JSON.AnyURI p_callbackReference, + in JSON.AnyURI p_links, + in FilterCriteria p_filterCriteria, + in TimeStamp p_expiryDeadline + + ) := { + subscriptionType := p_subscriptionType , + callbackReference := p_callbackReference, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } + + + template (value) MobilityProcedureSubscriptionError m_ams_subscription_error ( + in SubscriptionTyp p_subscriptionType, + in JSON.AnyURI p_callbackReference, + in JSON.AnyURI p_links, + in FilterCriteria p_filterCriteria, + in TimeStamp p_expiryDeadline + + ) := { + subscriptionType := p_subscriptionType, + callbackReference := p_callbackReference, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } + + template (present) MobilityProcedureSubscription mw_ams_subscription ( + in SubscriptionType p_subscriptionType, + in JSON.AnyURI p_callbackReference, + in JSON.AnyURI p_links, + in FilterCriteria p_filterCriteria, + in TimeStamp p_expiryDeadline + ) := { + subscriptionType := p_subscriptionType , + callbackReference := p_callbackReference, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } + + + + template (value) ProblemDetails m_problem_details( + in JSON.String p_type, + in JSON.String p_title, + in UInt32 p_status, + in JSON.String p_detail, + in JSON.String p_instance + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template m_problem_details + + template (present) ProblemDetails mw_problem_details( + template (present) JSON.String p_type := ?, + template (present) JSON.String p_title := ?, + template (present) UInt32 p_status := ?, + template (present) JSON.String p_detail := ?, + template (present) JSON.String p_instance := ? + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template mw_problem_details + + + + + +// +// template (omit) UserList m_user_list( +// in template (omit) UserInfos p_userInfo := omit, +// in ResourceURL p_resource_url +// ) := { +// user := p_userInfo, +// resourceURL := p_resource_url +// } // End of template m_user_list +// +// template UserList mw_user_list( +// template UserInfos p_userInfo := *, +// template (present) ResourceURL p_resource_url := ? +// ) := { +// user := p_userInfo, +// resourceURL := p_resource_url +// } // End of template mw_user_list +// +// template (value) LocationInfo m_location_info( +// in JSON.Number p_latitude, +// in JSON.Number p_longitude, +// in UInt32 p_accuracy +// ) := { +// latitude := p_latitude, +// longitude := p_longitude, +// altitude := omit, +// accuracy := p_accuracy +// } // End of template m_location_info +// +// template (present) LocationInfo mw_location_info( +// template (present) JSON.Number p_latitude := ?, +// template (present) JSON.Number p_longitude := ?, +// template (present) UInt32 p_accuracy := ? +// ) := { +// latitude := p_latitude, +// longitude := p_longitude, +// altitude := *, +// accuracy := p_accuracy +// } // End of template mw_location_info +// +// template (value) ZoneInfo m_zone_info( +// in ZoneId p_zone_id := PX_ZONE_ID, +// in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS, +// in NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := PX_NB_UNSERVICABLEL_ACCESS_POINTS, +// in NumberOfUsers p_number_of_users := PX_NB_USERS, +// in ResourceURL p_resource_url := PX_RESOURCE_URL +// ) := { +// zoneId := p_zone_id, +// numberOfAccessPoints := p_number_of_access_points, +// numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points, +// numberOfUsers := p_number_of_users, +// resourceURL := p_resource_url +// } // End of template m_zone_info +// +// template (present) ZoneInfo mw_zone_info( +// template (present) ZoneId p_zone_id := ?, +// template (present) NumberOfAccessPoints p_number_of_access_points := ?, +// template (present) NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := ?, +// template (present) NumberOfUsers p_number_of_users := ?, +// template (present) ResourceURL p_resource_url := ? +// ) := { +// zoneId := p_zone_id, +// numberOfAccessPoints := p_number_of_access_points, +// numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points, +// numberOfUsers := p_number_of_users, +// resourceURL := p_resource_url +// } // End of template mw_zone_info +// +// template (omit) AccessPointList m_access_point_list( +// in ZoneId p_zoneId := PX_ZONE_ID, +// in ResourceURL p_resourceURL, +// in template (omit) AccessPointInfos p_accessPoint := omit +// ) := { +// zoneId := p_zoneId, +// accessPoint := p_accessPoint, +// resourceURL := p_resourceURL +// } // End of template m_access_point_list +// +// template AccessPointList mw_access_point_list( +// template (present) ZoneId p_zoneId := ?, +// template (present) ResourceURL p_resourceURL := ?, +// template AccessPointInfos p_accessPoint := * +// ) := { +// zoneId := p_zoneId, +// accessPoint := p_accessPoint, +// resourceURL := p_resourceURL +// } // End of template mw_access_point_list +// +// template (value) UserTrackingSubscription m_user_tracking_subscription( +// in ClientCorrelator p_clientCorrelator, +// in CallbackReference p_callbackReference, +// in Address p_address := PX_USER, +// in UserEventCriteria p_userEventCriteria := { Transferring } +// ) := { +// clientCorrelator := p_clientCorrelator, +// callbackReference := p_callbackReference, +// address_ := p_address, +// userEventCriteria := p_userEventCriteria, +// resourceURL := omit +// } // End of template m_user_tracking_subscription +// +// template (present) UserTrackingSubscription mw_user_tracking_subscription_response( +// template (present) ClientCorrelator p_clientCorrelator := ?, +// template (present) CallbackReference p_callbackReference := ?, +// template (present) Address p_address := PX_USER, +// template (present) UserEventCriteria p_userEventCriteria := { Transferring }, +// template (present) ResourceURL p_resourceURL := ? +// ) := { +// clientCorrelator := p_clientCorrelator, +// callbackReference := p_callbackReference, +// address_ := p_address, +// userEventCriteria := p_userEventCriteria, +// resourceURL := p_resourceURL +// } // End of template mw_user_tracking_subscription +// +// template (value) ZonalTrafficSubscription m_zonal_traffic_subscription( +// in ClientCorrelator p_client_correlator, +// in CallbackReference p_callback_reference, +// in ZoneId p_zone_id +// ) := { +// clientCorrelator := p_client_correlator, +// callbackReference := p_callback_reference, +// zoneId := p_zone_id, +// interestRealm := omit, +// userEventCriteria := omit, +// duration := omit, +// resourceURL := omit +// } // End of template m_zonal_traffic_subscription +// +// template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription( +// template (present) ClientCorrelator p_client_correlator := ?, +// template (present) CallbackReference p_callback_reference := ?, +// template (present) ZoneId p_zone_id := ? +// ) := { +// clientCorrelator := p_client_correlator, +// callbackReference := p_callback_reference, +// zoneId := p_zone_id, +// interestRealm := *, +// userEventCriteria := *, +// duration := *, +// resourceURL := * +// } // End of template mw_zonal_traffic_subscription + +} // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn new file mode 100644 index 0000000..1799989 --- /dev/null +++ b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn @@ -0,0 +1,572 @@ +module Ams_TypesAndValues { + +// JSON +import from JSON all; + +// LibCommon +import from LibCommon_BasicTypesAndValues all; + +type record of AppMobilityServiceInfo AppMobilityServiceInfos; +type record AppMobilityServiceInfo { + RegistrationInfos registeredAppMobilityService , + String appMobilityServiceId +} + +type record of RegistrationInfo RegistrationInfos; +type record RegistrationInfo { + ServiceConsumerId serviceConsumerId, + DeviceInformations deviceInformation optional, + UInt32 expiryTime optional +} + + +type record RegistrationRequest { + ServiceConsumerId serviceConsumerId, + DeviceInformations deviceInformation optional, + UInt32 expiryTime optional +} + + +type record of ServiceConsumerId ServiceConsumerIds; +type record ServiceConsumerId { + String appInstanceId optional, + String mepId optional +} + +// Erroneous parameter: appInstance should be appInstanceId +type record of ServiceConsumer ServiceConsumers; +type record ServiceConsumer { + String appInstance optional, + String mepId optional +} + +type record of DeviceInformation DeviceInformations; +type record DeviceInformation { + String associateId +} + + +type JSON.AnyURI links; + +type enumerated SubscriptionType { + RESERVED, + MOBILITY_PROCEDURE, + ADJACENT_APPINFO +} + + +type enumerated SubscriptionTyp { + RESERVED, + MOBILITY_PROCEDURE, + ADJACENT_APPINFO +} + +type record Subscription { + JSON.AnyURI href, + SubscriptionType subscriptionType +} + + +type record of AmsSubscriptionLinkList AmsSubscriptionLinkLists; +type record AmsSubscriptionLinkList { + JSON.AnyURI links, + Subscription subscription +} + + +type record MobilityProcedureSubscriptionError { + SubscriptionTyp subscriptionType, + JSON.AnyURI callbackReference, + JSON.AnyURI links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional +} + + +type record of MobilityProcedureSubscription MobilityProcedureSubscriptions; +type record MobilityProcedureSubscription { + SubscriptionType subscriptionType, + JSON.AnyURI callbackReference, + JSON.AnyURI links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional +} + +type enumerated MobilityStatusType { + INTERHOST_MOVEOUT_TRIGGERED, + TARGET_APPINST_CONFIRMED, + TARGET_TRAFFIC_RULE_ACTIVATED, + INTERHOST_MOVEOUT_COMPLETED, + INTERHOST_MOVEOUT_FAILED +} + +type record AssociateIdList { + String associateId +} + +type record of FilterCriteria FilterCriterias; +type record FilterCriteria { + String appInstanceId optional, + AssociateIdList associateId optional, + MobilityStatusType mobilityStatus +} + + + +type record AdjacentFilterCriteria { + String appInstanceId optional +} + + +type record of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions; +type record AdjacentAppInfoSubscription { + SubscriptionType subscriptionType, + JSON.AnyURI callbackReference, + JSON.AnyURI links optional, + AdjacentFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional +} + + /** + * @desc + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type UInt32 Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type UInt32 NanoSeconds; + +/** +* @desc Problem Details for HTTP APIs +* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type +* @member title A short, human-readable summary of the problem type +* @member status The HTTP status code for this occurrence of the problem +* @member detail A human-readable explanation specific to this occurrence of the problem +* @member instance A URI reference that identifies the specific occurrence of the problem +* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object +*/ +type record ProblemDetails { + JSON.String type_, + JSON.String title, + UInt32 status, + JSON.String detail, + JSON.String instance +} with { + variant (type_) "name as 'type'"; +} + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// /** +// * @desc +// * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC +// * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC +// */ +// type record TimeStamp { +// Seconds seconds, +// NanoSeconds nanoSeconds +// } +// +// /** +// * @desc A type containing list of users. +// * @member user Collection of the zone information list. +// * @member resourceURL Self referring URL. +// */ +// type record of UserInfo UserInfos; +// type record UserList { +// UserInfos user optional, +// ResourceURL resourceURL +// } +// +// /** +// * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. +// * @member latitude +// * @member longitude +// * @member altitude +// * @member accuracy +// */ +// type record LocationInfo { +// JSON.Number latitude, +// JSON.Number longitude, +// JSON.Number altitude optional, +// UInt32 accuracy +// } // End of type LocationInfo +// +// /** +// * @desc A type containing zone information. +// * @member zoneId Identifier of zone +// * @member numberOfAccessPoints The number of access points within the zone +// * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. +// * @member numberOfUsers The number of users currently on the access point. +// * @member resourceURL Self referring URL. +// */ +// type record ZoneInfo { +// ZoneId zoneId, +// NumberOfAccessPoints numberOfAccessPoints, +// NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, +// NumberOfUsers numberOfUsers, +// ResourceURL resourceURL +// } +// +// /** +// * @desc Collection of the zone information list. +// * @member zone Collection of the zone information list. +// * @member resourceURL Self referring URL. +// */ +// type record of ZoneInfo ZoneInfos; +// type record ZoneList { +// ZoneInfos zone optional, +// ResourceURL resourceURL +// } +// +// /** +// * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element +// */ +// type JSON.String AccessPointId; +// +// /** +// * @desc A type containing access point information. +// * @member accessPointId +// * @member connectionType The connection type for the access poin +// * @member operationStatus The operation status of the access point +// * @member numberOfUsers The number of users currently on the access point. +// * @member resourceURL Self referring URL. +// */ +// type record AccessPointInfo { +// AccessPointId accessPointId, +// LocationInfo locationInfo optional, +// ConnectionType connectionType, +// OperationStatus operationStatus, +// NumberOfUsers numberOfUsers, +// InterestRealm interestRealm, +// ResourceURL resourceURL +// } +// type record of AccessPointInfo AccessPointInfos; +// +// /** +// * @desc A type containing list of access points. +// * @member zoneId +// * @member accessPoint Collection of the access point information list. +// * @member resourceURL +// */ +// type record AccessPointList { +// ZoneId zoneId, +// AccessPointInfos accessPoint optional, +// ResourceURL resourceURL +// } +// +// /** +// * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). +// */ +// type JSON.String Address +// +// /** +// * @desc Reserved for future use. +// */ +// type JSON.String AncillaryInfo; +// +// /** +// * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ +//REST_NetAPI_Common]. +// */ +// type JSON.String CallbackData; +// +// /** +// * @desc Notification callback definition. +// * @member notifyURL +// */ +// type record CallbackReference { +// NotifyURL notifyURL +// } +// +// /** +// * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. +// */ +// type JSON.String ClientCorrelator; +// +// /** +// * @desc The connection type for the access point +// */ +// type enumerated ConnectionType { +// Femto, +// LTE_femto, +// Smallcell, +// LTE_smallcell, +// Wifi, +// Pico, +// Micro, +// Macro, +// Wimax, +// Unknown +// } +// +// /** +// * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.) +// */ +// type JSON.String ContextLocationInfo; +// +// /** +// * @desc Zone ID +// */ +// type JSON.String CurrentAccessPointId; +// +// /** +// * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid. +// */ +// type JSON.Date Duration; +// +// /** +// * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.). +// */ +// type JSON.String InterestRealm; +// +// /** +// * @desc Link to other resources +// * @member rel Describes the relationship between the URI and the resource. +// * @member href UTI +// */ +// type record Link { +// JSON.String rel, +// JSON.String href +// } +// +// /** +// * @desc The URL of your own listener application. +// */ +// type JSON.String NotifyURL; +// +// /** +// * @desc The number of access points within the zone +// */ +// type UInt32 NumberOfAccessPoints; +// +// /** +// * @desc Number of inoperable access points within the zone. +// */ +// type UInt32 NumberOfUnserviceableAccessPoints; +// +// /** +// * @desc The number of users currently on the access point. +// */ +// type UInt32 NumberOfUsers; +// +// /** +// * @desc Threshold number of users in an access point which if crossed shall cause a notification. +// */ +// type UInt32 NumberOfUsersAPThreshold; +// +// /** +// * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. +// */ +// type UInt32 NumberOfUsersInAP; +// +// /** +// * @desc Threshold number of users in a zone which if crossed shall cause a notification. +// */ +// type UInt32 NumberOfUsersInZone; +// +// /** +// * @desc Threshold number of users in a zone which if crossed shall cause a notification. +// */ +// type UInt32 NumberOfUsersZoneThreshold; +// +// /** +// * @desc The operation status of the access point +// */ +// type enumerated OperationStatus { +// Serviceable, +// Unserviceable, +// Unknown +// } +// +// /** +// * @desc Zone ID +// */ +// type JSON.String PreviousAccessPointId; +// +// /** +// * @desc Self referring URL +// */ +// type JSON.AnyURI ResourceURL; +// +// /** +// * @desc Indicates the time of day for zonal presence notification. +// */ +// type JSON.String Timestamp; +// +// /** +// * @desc Time zone of access point +// */ +// type JSON.String Timezone; +// +// /** +// * @desc User event +// */ +// type enumerated UserEventType { +// Entering, +// Leaving, +// Transferring +// } +// +// /** +// * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event. +// */ +// type record of UserEventType UserEventCriteria; +// +// /** +// * @desc A type containing user information. +// * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). +// * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). +// * @member zoneId Identifier of zone +// * @member resourceURL Self referring URL. +// * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. +// * @member contextLocationInfo +// * @member ancillaryInfo +// */ +// type record UserInfo { +// Address address_, +// AccessPointId accessPointId, +// ZoneId zoneId, +// ResourceURL resourceURL, +// LocationInfo locationInfo optional, +// ContextLocationInfo contextLocationInfo optional, +// AncillaryInfo ancillaryInfo optional +// } with { +// variant (address_) "name as 'address'"; +// } // End of type UserInfo +// +// /** +// * @desc A type containing user tracking subscription. +// * @member +// */ +// type record UserTrackingSubscription { +// ClientCorrelator clientCorrelator optional, +// CallbackReference callbackReference, +// Address address_, +// UserEventCriteria userEventCriteria optional, +// ResourceURL resourceURL optional +// } with { +// variant (address_) "name as 'address'"; +// } +// +// /** +// * @desc A type containing zonal presence notification +// * @member +// * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. +// */ +// type record ZonalPresenceNotification { +// CallbackReference callbackReference optional, +// ZoneId zoneId, +// Address address_, +// InterestRealm interestRealm optional, +// UserEventType userEventType, +// CurrentAccessPointId currentAccessPointId, +// PreviousAccessPointId previousAccessPointId optional, +// Timestamp timestamp_, +// Link link optional +// } with { +// variant (address_) "name as 'address'"; +// variant (timestamp_) "name as 'timestamp'"; +// } +// +// /** +// * @desc A type containing zonal traffic subscription +// * @member +// * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). +// * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. +// * @member resourceURL +// */ +// type record ZonalTrafficSubscription { +// ClientCorrelator clientCorrelator optional, +// CallbackReference callbackReference, +// ZoneId zoneId, +// InterestRealm interestRealm optional, +// UserEventCriteria userEventCriteria optional, +// Duration duration optional, +// ResourceURL resourceURL optional +// } +// +// /** +// * @desc Identifier of zone +// */ +// type JSON.String ZoneId; +// +// /** +// * @desc A type containing zone status notification. +// * @member zoneId +// * @member +// */ +// type record ZoneStatusNotification { +// CallbackData callbackData optional, +// ZoneId zoneId, +// AccessPointId accessPointId optional, +// NumberOfUsersInZone numberOfUsersInZone optional, +// NumberOfUsersInAP numberOfUsersInAP optional, +// OperationStatus operationStatus optional, +// Timestamp timestamp_, +// Link link +// } with { +// variant (timestamp_) "name as 'timestamp'"; +// } +// +// /** +// * @desc A type containing zone status subscription. +// * @member zoneId +// * @member +// * @member +// * @member +// * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). +// */ +// type record ZoneStatusSubscription { +// ClientCorrelator clientCorrelator optional, +// ResourceURL resourceURL optional, +// CallbackReference callbackReference, +// ZoneId zoneId, +// NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, +// NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, +// OperationStatus operationStatus optional +// } +// +// /** +// * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC +// */ +// type UInt32 Seconds; +// +// /** +// * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC +// */ +// type UInt32 NanoSeconds; + +} with { +encode "JSON" +} diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index a71efad..56eade5 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -30,6 +30,8 @@ module LibMec_Pics { modulepar boolean PICS_RNIS_NOTIFICATIONS := false; + modulepar boolean PICS_AMS := true; + modulepar charstring PICS_ROOT_API := "exampleAPI"; } // End of module LibMec_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 1b02fbd..ac20b00 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -18,4 +18,9 @@ module LibMec_Pixits { modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations"; + modulepar charstring PX_ME_APP_AMS_URI := "/amsi/v1/appMobilityServices" + + modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions" + + } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn index 0ca201b..b060cb4 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn @@ -8,6 +8,8 @@ module LibItsHttp_JsonMessageBodyTypes { import from RnisAPI_TypesAndValues all; // LibMec/BwManagementApi import from BwManagementAPI_TypesAndValues all; + // LibMec/Ams + import from Ams_TypesAndValues all; /** * This file volontary contains a trivial declaration of the type JsonBody. @@ -30,6 +32,10 @@ module LibItsHttp_JsonMessageBodyTypes { RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis, BwInfo bwInfo, BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management, + AppMobilityServiceInfo appMobilityServiceInfo, + Ams_TypesAndValues.ProblemDetails problemDetails_ams, + Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, + Ams_TypesAndValues.AmsSubscriptionLinkLists subscriptionLinkList_ams, universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn index 1268b9d..b0986e5 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn @@ -1,192 +1,256 @@ /** - * @author ETSI / STF569 - * @version $URL$ - * $ID:$ - * @desc This module provides the custom templates for ITS HTTP based protocols. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - */ +* @author ETSI / STF569 +* @version $URL$ +* $ID:$ +* @desc This module provides the custom templates for ITS HTTP based protocols. +* @copyright ETSI Copyright Notification +* No part may be reproduced except as authorized by written permission. +* The copyright and the foregoing restriction extend to reproduction in all media. +* All rights reserved. +*/ module LibItsHttp_JsonTemplates { - - // LibMec/LocationAPI - import from LocationAPI_TypesAndValues all; - import from LocationAPI_Templates all; - // LibMec/UEidentityAPI - import from UEidentityAPI_TypesAndValues all; - import from UEidentityAPI_Templates all; - // LibMec/RnisAPI - import from RnisAPI_TypesAndValues all; - import from RnisAPI_Templates all; - // LibMec/BwManagementAPI - import from BwManagementAPI_TypesAndValues all; - import from BwManagementAPI_Templates all; - - // TODO Add here your custom RFCs import - - // LibItsHttp - import from LibItsHttp_JsonMessageBodyTypes all; - import from LibItsHttp_JSONTypes all; - - template (value) JsonBody m_json_body_raw( - in template (value) charstring p_raw - ) := { - raw := p_raw - } // End of template m_json_body_raw - - template (present) JsonBody mw_json_body_raw( - template (present) charstring p_raw := ? - ) := { - raw := p_raw - } // End of template mw_json_body_raw - - group locarion_api { - - template (value) JsonBody m_body_json_user_info( - in template (value) UserInfo p_user_info - ) := { - userInfo := p_user_info - } // End of template m_body_json_user_info - - template (present) JsonBody mw_body_json_user_info( - template (present) UserInfo p_user_info := ? - ) := { - userInfo := p_user_info - } // End of template mw_body_json_user_info - - template (value) JsonBody m_body_json_user_list( - in template (value) UserList p_user_list - ) := { - userList := p_user_list - } // End of template m_body_json_user_list - - template (present) JsonBody mw_body_json_user_list( - template (present) UserList p_user_list := ? - ) := { - userList := p_user_list - } // End of template mw_body_json_user_list - - template (value) JsonBody m_body_json_zone_info( - in template (value) ZoneInfo p_zone_info - ) := { - zoneInfo := p_zone_info - } // End of template m_body_json_zone_info - - template (present) JsonBody mw_body_json_zone_info( - template (present) ZoneInfo p_zone_info := ? - ) := { - zoneInfo := p_zone_info - } // End of template mw_body_json_zone_info - - template (value) JsonBody m_body_json_access_point_list( - in template (value) AccessPointList p_access_point_list - ) := { - accessPointList := p_access_point_list - } // End of template m_body_json_access_point_list - - template (present) JsonBody mw_body_json_access_point_list( - template (present) AccessPointList p_access_point_list := ? - ) := { - accessPointList := p_access_point_list - } // End of template mw_body_json_access_point_list - - template (value) JsonBody m_body_json_user_tracking_subscription( - in template (value) UserTrackingSubscription p_user_tracking_subscription - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template m_body_json_user_tracking_subscription - - template (present) JsonBody mw_body_json_user_tracking_subscription( - template (present) UserTrackingSubscription p_user_tracking_subscription := ? - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template mw_body_json_user_rtracking_subscription - - template (value) JsonBody m_body_json_zonal_traffic_subscription( - in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription - ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template m_body_json_zonal_traffic_subscription - - template (present) JsonBody mw_body_json_zonal_traffic_subscription( - template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ? - ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template mw_body_json_zonal_traffic_subscription - - } // End of group locarion_api - - group ue_identity_api { - - template (value) JsonBody m_body_json_ue_identity_tag_info( - in template (value) UeIdentityTagInfo p_ueIdentityTagInfo - ) := { - ueIdentityTagInfo := p_ueIdentityTagInfo - } // End of template m_body_json_ue_identity_tag_info - - template (present) JsonBody mw_body_json_ue_identity_tag_info( - template (present) UeIdentityTagInfo p_ueIdentityTagInfo := ? - ) := { - ueIdentityTagInfo := p_ueIdentityTagInfo - } // End of template mw_body_json_ue_identity_tag_info - - template (value) JsonBody m_body_json_ue_identity_problem_details( - in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails_ue_identity := p_problemDetails - } // End of template m_body_json_ue_identity_problem_details - - template (present) JsonBody mw_body_json_ue_identity_problem_details( - template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ? - ) := { - problemDetails_ue_identity := p_problemDetails - } // End of template mw_body_json_ue_identity_problem_details - - } // End of group ue_identity_api - - group rnis_subscriptions { - - template (value) JsonBody m_body_json_subscriptions_list( - in template (value) SubscriptionLinkList p_subscriptionLinkList - ) := { - subscriptionLinkList := p_subscriptionLinkList - } // End of template m_body_json_subscriptions_list - - template (present) JsonBody mw_body_json_subscriptions_list( - template (present) SubscriptionLinkList p_subscriptionLinkList := ? - ) := { - subscriptionLinkList := p_subscriptionLinkList - } // End of template mw_body_json_subscriptions_list - - template (value) JsonBody m_body_json_cell_change_subscription( - in template (value) CellChangeSubscription p_cellChangeSubscription - ) := { - cellChangeSubscription := p_cellChangeSubscription - } // End of template m_body_json_cell_change_subscription - - template (present) JsonBody mw_body_json_cell_change_subscription( - template (present) CellChangeSubscription p_cellChangeSubscription := ? - ) := { - cellChangeSubscription := p_cellChangeSubscription - } // End of template mw_body_json_cell_change_subscription - - } // End of group rnis_subscriptions - - group bw_management_api { - - template (value) JsonBody m_body_json_bw_info( - in template (value) BwInfo p_bwInfo - ) := { - bwInfo := p_bwInfo - } // End of template m_body_json_bw_info - - template (present) JsonBody mw_body_json_bw_info( - template (present) BwInfo p_bwInfo := ? - ) := { - bwInfo := p_bwInfo - } // End of template mw_body_json_bw_info - - } // End of group bw_management_api - + +// LibMec/LocationAPI +import from LocationAPI_TypesAndValues all; +import from LocationAPI_Templates all; +// LibMec/UEidentityAPI +import from UEidentityAPI_TypesAndValues all; +import from UEidentityAPI_Templates all; +// LibMec/RnisAPI +import from RnisAPI_TypesAndValues all; +import from RnisAPI_Templates all; +// LibMec/BwManagementAPI +import from BwManagementAPI_TypesAndValues all; +import from BwManagementAPI_Templates all; + +// LibMec/Ams +import from Ams_TypesAndValues all; +import from Ams_Templates all; + + +// TODO Add here your custom RFCs import + +// LibItsHttp +import from LibItsHttp_JsonMessageBodyTypes all; +import from LibItsHttp_JSONTypes all; + +template (value) JsonBody m_json_body_raw( + in template (value) charstring p_raw +) := { + raw := p_raw +} // End of template m_json_body_raw + +template (present) JsonBody mw_json_body_raw( + template (present) charstring p_raw := ? +) := { + raw := p_raw +} // End of template mw_json_body_raw + + +group ams_api { + + template (value) JsonBody m_body_json_app_mobility_service_info( + in template (value) AppMobilityServiceInfo p_app_mobility_service_info + ) := { + appMobilityServiceInfo := p_app_mobility_service_info + } // End of template mw_body_json_app_mobility_service_info + + template (present) JsonBody mw_body_json_app_mobility_service_info( + template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? + ) := { + appMobilityServiceInfo := p_app_mobility_service_info + } // End of template mw_body_json_app_mobility_service_info + + + template (value) JsonBody m_body_json_ams_problem_details( + in template (value) Ams_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails_ams := p_problemDetails + } // End of template m_body_json_ue_identity_problem_details + + template (present) JsonBody mw_body_json_ams_problem_details( + template (present) Ams_TypesAndValues.ProblemDetails p_problemDetails := ? + ) := { + problemDetails_ams := p_problemDetails + } // End of template mw_body_json_ue_identity_problem_details + + + template (present) JsonBody mw_body_json_ams_registration_request( + template (present) Ams_TypesAndValues.RegistrationRequest p_registrationRequest := ? + ) := { + registrationRequest_ams := p_registrationRequest + } // End of template mw_body_json_ue_identity_problem_details + + template (value) JsonBody m_body_json_ams_registration_request( + in template (value) Ams_TypesAndValues.RegistrationRequest p_registrationRequest + ) := { + registrationRequest_ams := p_registrationRequest + } // End of template m_body_json_ue_identity_problem_details + + + template (present) JsonBody mw_body_json_ams_subscriptions( + template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ue_identity_problem_details + + template (present) JsonBody m_body_json_ams_subscriptions( + template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ue_identity_problem_details + +} // end of group ams api + + + +group locarion_api { + + template (value) JsonBody m_body_json_user_info( + in template (value) UserInfo p_user_info + ) := { + userInfo := p_user_info + } // End of template m_body_json_user_info + + template (present) JsonBody mw_body_json_user_info( + template (present) UserInfo p_user_info := ? + ) := { + userInfo := p_user_info + } // End of template mw_body_json_user_info + + template (value) JsonBody m_body_json_user_list( + in template (value) UserList p_user_list + ) := { + userList := p_user_list + } // End of template m_body_json_user_list + + template (present) JsonBody mw_body_json_user_list( + template (present) UserList p_user_list := ? + ) := { + userList := p_user_list + } // End of template mw_body_json_user_list + + + template (value) JsonBody m_body_json_zone_info( + in template (value) ZoneInfo p_zone_info + ) := { + zoneInfo := p_zone_info + } // End of template m_body_json_zone_info + + template (present) JsonBody mw_body_json_zone_info( + template (present) ZoneInfo p_zone_info := ? + ) := { + zoneInfo := p_zone_info + } // End of template mw_body_json_zone_info + + template (value) JsonBody m_body_json_access_point_list( + in template (value) AccessPointList p_access_point_list + ) := { + accessPointList := p_access_point_list + } // End of template m_body_json_access_point_list + + template (present) JsonBody mw_body_json_access_point_list( + template (present) AccessPointList p_access_point_list := ? + ) := { + accessPointList := p_access_point_list + } // End of template mw_body_json_access_point_list + + template (value) JsonBody m_body_json_user_tracking_subscription( + in template (value) UserTrackingSubscription p_user_tracking_subscription + ) := { + userTrackingSubscription := p_user_tracking_subscription + } // End of template m_body_json_user_tracking_subscription + + template (present) JsonBody mw_body_json_user_tracking_subscription( + template (present) UserTrackingSubscription p_user_tracking_subscription := ? + ) := { + userTrackingSubscription := p_user_tracking_subscription + } // End of template mw_body_json_user_rtracking_subscription + + template (value) JsonBody m_body_json_zonal_traffic_subscription( + in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription + ) := { + zonalTrafficSubscription := p_zonal_traffic_subscription + } // End of template m_body_json_zonal_traffic_subscription + + template (present) JsonBody mw_body_json_zonal_traffic_subscription( + template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ? + ) := { + zonalTrafficSubscription := p_zonal_traffic_subscription + } // End of template mw_body_json_zonal_traffic_subscription + +} // End of group locarion_api + +group ue_identity_api { + + template (value) JsonBody m_body_json_ue_identity_tag_info( + in template (value) UeIdentityTagInfo p_ueIdentityTagInfo + ) := { + ueIdentityTagInfo := p_ueIdentityTagInfo + } // End of template m_body_json_ue_identity_tag_info + + template (present) JsonBody mw_body_json_ue_identity_tag_info( + template (present) UeIdentityTagInfo p_ueIdentityTagInfo := ? + ) := { + ueIdentityTagInfo := p_ueIdentityTagInfo + } // End of template mw_body_json_ue_identity_tag_info + + template (value) JsonBody m_body_json_ue_identity_problem_details( + in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails_ue_identity := p_problemDetails + } // End of template m_body_json_ue_identity_problem_details + + template (present) JsonBody mw_body_json_ue_identity_problem_details( + template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ? + ) := { + problemDetails_ue_identity := p_problemDetails + } // End of template mw_body_json_ue_identity_problem_details + +} // End of group ue_identity_api + +group rnis_subscriptions { + + template (value) JsonBody m_body_json_subscriptions_list( + in template (value) SubscriptionLinkList p_subscriptionLinkList + ) := { + subscriptionLinkList := p_subscriptionLinkList + } // End of template m_body_json_subscriptions_list + + template (present) JsonBody mw_body_json_subscriptions_list( + template (present) SubscriptionLinkList p_subscriptionLinkList := ? + ) := { + subscriptionLinkList := p_subscriptionLinkList + } // End of template mw_body_json_subscriptions_list + + template (value) JsonBody m_body_json_cell_change_subscription( + in template (value) CellChangeSubscription p_cellChangeSubscription + ) := { + cellChangeSubscription := p_cellChangeSubscription + } // End of template m_body_json_cell_change_subscription + + template (present) JsonBody mw_body_json_cell_change_subscription( + template (present) CellChangeSubscription p_cellChangeSubscription := ? + ) := { + cellChangeSubscription := p_cellChangeSubscription + } // End of template mw_body_json_cell_change_subscription + +} // End of group rnis_subscriptions + +group bw_management_api { + + template (value) JsonBody m_body_json_bw_info( + in template (value) BwInfo p_bwInfo + ) := { + bwInfo := p_bwInfo + } // End of template m_body_json_bw_info + + template (present) JsonBody mw_body_json_bw_info( + template (present) BwInfo p_bwInfo := ? + ) := { + bwInfo := p_bwInfo + } // End of template mw_body_json_bw_info + +} // End of group bw_management_api + } // End of module LibItsHttp_JsonTemplates -- GitLab