diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 012788d12b36f00c2c14b832d00433a925eb027b..956701ebcb0cda576d1e30234d06bdb147cf8e4b 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -32,6 +32,10 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo(); bw_info.encode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ATL_bwchgeventsubscription)) { + const TrafficManagementAPI__TypesAndValues::BwChgEventSubscription& bw_chg_event_subscription = msg.bwInfo(); + bw_info.encode(TrafficManagementAPI__TypesAndValues::BwChgEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_mtsSessionInfo)) { const TrafficManagementAPI__TypesAndValues::MtsSessionInfo& mts_session_info = msg.mtsSessionInfo(); mts_session_info.encode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -153,6 +157,15 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes bw_info.decode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; } + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList + TrafficManagementAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + subscription_link_list.decode(TrafficManagementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList() = subscription_link_list; + } else if ((it->second.find("\"bwchgeventsubscription\"") != std::string::npos) { + TrafficManagementAPI__TypesAndValues::BwChgEventSubscription bw_chg_event_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + bw_chg_event_subscription.decode(TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.bwchgeventsubscription() = bw_chg_event_subscription; } else if ((it->second.find("\"mtsCapabilityInfo\"") != std::string::npos) || (it->second.find("\"mtsAccessInfo\"") != std::string::npos)) { TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo mts_cap_info; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); diff --git a/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..5464190fa66baf6cde7579dd9e8fe3e1f3e6d1b4 --- /dev/null +++ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ @@ -0,0 +1,195 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +# LibMec_Pixits + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_TrafficManagement/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.12,port=30030,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_01 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_02 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_03 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_BR +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_01 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_02 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_03 +# Check that the IUT acknowledges a creation of a bandwidthAllocation resource +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_02 +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK +#Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01 +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_02 +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#TC_MEC_MEC015_SRV_TM_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_02 +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#TC_MEC_MEC015_SRV_TM_005_NF +#Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK +#Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF + +// Multi-access Traffic Steering information Test Cases +#Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_01 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_02 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_03 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_04 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_01 +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR +#Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_NF +#Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_BR +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_NF +#Check that the IUT deregisters a MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_OK +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_NF + +// BWM change event susbsciption Testcases +#Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR +#Check that the IUT responds with an error when no subscription are created +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF +#Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK +#Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF +#Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 +#Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK +#Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF +#Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Applications +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK +#Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF +#Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 12ea8f68a797a8a32ef1bc79816a68298d1d73dc..02680c73080936d2f1326319696246b3b5e93265 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** -* @Author ETSI / STF569 / TTF012 +* @Author ETSI / STF569 / TTF012 / TTF T043 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -7,7 +7,7 @@ * 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 010-2 V2.2.1 +* @see ETSI GS MEC 003, Draft ETSI GS MEC 010-2 V3.2.1 */ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { @@ -623,8 +623,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( PX_APP_PKG_NAME, PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-, PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -637,11 +636,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + -, + mw_checksum, + CREATED, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE )))))) -> value v_response { tc_ac.stop; @@ -687,8 +686,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( "", PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-, PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -755,12 +753,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum - ), + -, + mw_checksum, + PX_ONBOARDED_STATE, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE, + - + ), * } ))))) -> value v_response { @@ -821,12 +820,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + mw_app_pkg_info_onboarded( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum, + -, + PX_ONBOARDED_STATE_ONBOARDED ), * } @@ -994,8 +995,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( - PX_APP_PKG_ID + mw_app_pkg_info_onboarded( + v_app_pkg_info.id )))))) -> value v_response { tc_ac.stop; @@ -2209,10 +2210,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - v_app_pkg_info.id, - v_app_pkg_info.appDId - ) - , + -, + mw_checksum, + PX_ONBOARDED_STATE, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE + ), * } ))))) { @@ -2233,7 +2236,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK /** - * @desc Check that MEPM returns the list of App Packages when requested - Note 3 + * @desc Check that MEPM returns the list of on-boarded App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2271,11 +2274,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED ) , * @@ -2440,11 +2443,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED )))))) { tc_ac.stop; diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 904a4d0c1ce16efe2f47058c39d34713cc21b43b..eda51f702ba34faf0e0bd34a7d064778e8e7bf7e 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * 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 002, Draft ETSI GS MEC 016 V2.2.1 (2020-04) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 016 V3.1.1 (2024-03) */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { @@ -44,7 +44,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -102,7 +102,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -157,7 +157,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -215,7 +215,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -270,7 +270,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -325,7 +325,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -404,7 +404,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -473,7 +473,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -542,7 +542,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -616,7 +616,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -688,7 +688,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -757,7 +757,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT deletes the application context when commanded by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -814,7 +814,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -869,7 +869,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -942,7 +942,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1010,7 +1010,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0bf8bcf5f2c4902f2018b7fd8371d57fcc098637 --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn @@ -0,0 +1,1036 @@ +/** + * @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 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) + */ +module AtsMec_BandwidthChangeEventSubAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/TrafficManagementAPI + import from TrafficManagementAPI_TypesAndValues all; + import from TrafficManagementAPI_Templates all; + import from TrafficManagementAPI_Functions all; + import from TrafficManagementAPI_Pics all; + import from TrafficManagementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + + group BWSUBLOOKUP{ + + /** + * @desc Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_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_bw_subscription_link_list( + mw_subscription_link_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_ME_BWM_SUB_URI }, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + "BwChgEventSubscription" + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/?subscriptionType=UnknownType", + 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 + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + 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 + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when no subscription are created + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + 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 + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "?" & "subscription_type=bw_chg", + 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_bw_subscription_link_list( + mw_subscription_link_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_ME_BWM_SUB_URI }, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + "BwChgEventSubscription" + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK + + /** + * @desc Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type + */ + testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_UNKNOWN_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_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + 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 + + // Postamble + f_cf_01_http_down(); + } // End of testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF + + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + 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_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + v_bw_chg_event_subscription.subscriptionType, + v_bw_chg_event_subscription.callbackReference, + -, + mw_links( + v_bw_chg_event_subscription.links.self.href + ), + mw_filter_criteria( + v_bw_chg_event_subscription.filterCriteria.appInsId + ) + + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_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_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF + + } + + group BW_SUB { + + /** + * @desc Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_SUB_URI & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwChgEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_UNKNOWN_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + m_filter_Criteria + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + 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 + + // Postamble + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_type, + -, + -, + -, + m_filter_criteria + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + 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 testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type, + PX_BW_EVENT_SUB_CALLBACK_URI, + { websocketUri := PX_BW_SUB_WEB_SOCKET, requestWebsocketUri := omit }, + -, + m_filter_criteria + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + 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 testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> value v_response { + tc_ac.stop; + + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwSubscriptionNotification ***"); + 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 + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully cancels the BwChgEventSubscription ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with an error cancelling the BwChgEventSubscription ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK + + /** + * @desc Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_response( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json__bw_chg_event_notification( + mw_bw_chg_event_notification( + -, + -, + mw_data_vol_dispersion( + 1024,PX_APP_INSTANCE_ID + ), + - + + )))))) -> value v_response { + tc_wait.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + 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 + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + } + +} \ No newline at end of file diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 1026770d48daa8a45ed0539dcb05974e0a5b9316..091c2232c602937f42cf9853906a960a33452c37 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * 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 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06) + * @see ETSI GS MEC 015, ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index f3b601d76972bdb8b9851b73a9e21f774ad69631..50d2114794b6c2966cdd0536f7da9a13caf374ee 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * 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 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06) + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_TrafficManagementAPI_TestCases { diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index 842fd6f4f7ab4614a5f20d835d06cf00df3dc81f..260f4ceb36b58cde9bdafef3cb3c7c3144ee37e1 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -41,6 +41,23 @@ module AtsMec_TrafficManagementAPI_TestControl { execute(TC_MEC_MEC015_SRV_TM_006_OK()); execute(TC_MEC_MEC015_SRV_TM_006_NF()); } + + if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK()); + execute(TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF()); + + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK()); + } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { execute(TC_MEC_MEC015_SRV_MTS_001_OK()); diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index b24f6e67199837784cd80a079844a37c172c6c5c..e4c759d6973add82227ba60f1ac83d9c4873e7dc 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -2,6 +2,7 @@ suite := AtsMec_TrafficManagement sources := \ AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn \ AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ AtsMec_TrafficManagementAPI_TestControl diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 7c4418c71fdd841f97470fe31f351dcfe844e597..7a85b02e2773142362b7843db2d01822874183f1 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * 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, ETSI GS MEC 014 V3.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.2.1 */ module AtsMec_UEidentityAPI_TestCases { diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index 027b5cc26de1b7a01049a4b03b3da2a6b7d6accc..2a037b28f1c213e7261d90014a28c61b4fcab7c5 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -53,8 +53,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_CHECKSUM := "CHECKSUM"; modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; + + modulepar Json.String PX_ONBOARDED_STATE_ONBOARDED := "ONBOARDED"; + + modulepar Json.String PX_ONBOARDED_STATE := "CREATED"; - modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; + modulepar OperationalState PX_OPERATIONAL_STATE := "ENABLED"; modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index b914cc021008429ac735901d7b606e3d6184bc1a..2121e455829904294d023b4eb5d5b22038738e95 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -213,41 +213,37 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { appPkgPath := p_appPkgPath } // End of template mw_create_package_management - template (omit) AppPkgInfo m_app_pkg_info( - in template (value) Json.String p_id, - in template (value) Json.String p_appDId, - in template (value) Json.String p_appName, - in template (value) Json.String p_appSoftwareVersion, - in template (value) Json.String p_appDVersion, - in template (value) Checksum p_checksum, - in template (value) AppPkgSWImageInfo p_softwareImages, - in template (value) OnboardingState p_onboardingState, - in template (value) AppPkgInfo_OperationalState p_operationalState, - in template (value) UsageState p_usageState, - in template (value) AppPkgInfo_MecInfo p_mecInfo, - in template (value) AppPkgInfo_Links p_links, - in template (omit) Json.String p_appProvider := omit - ) := { - id := p_id, - appDId := p_appDId, - appProvider := p_appProvider, - appName := p_appName, - appSoftwareVersion := p_appSoftwareVersion, - appDVersion := p_appDVersion, + // template (omit) AppPkgInfo m_app_pkg_info( + // in template (value) Checksum p_checksum, + // in template (value) OnboardingState p_onboardingState, + // in template (value) AppPkgInfo_OperationalState p_operationalState, + // in template (value) UsageState p_usageState, + // in template (value) AppPkgInfo_Links p_links, + // ) := { + // checksum := p_checksum, + // onboardingState := p_onboardingState, + // operationalState := p_operationalState, + // usageState := p_usageState, + // links := p_links + // } // End of template m_app_pkg_info + + template (present) AppPkgInfo mw_app_pkg_info( + template (present) Json.String p_id := ?, + template (present) Checksum p_checksum := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_Links p_links := ? + ) := { + id := p_id, checksum := p_checksum, - signingCertificate := omit, - softwareImages := p_softwareImages, - additionalArtifacts := omit, onboardingState := p_onboardingState, operationalState := p_operationalState, usageState := p_usageState, - mecInfo := p_mecInfo, - userDefinedData := omit, - onboardingFailureDetails := omit, links := p_links - } // End of template m_app_pkg_info - - template (present) AppPkgInfo mw_app_pkg_info( + } // End of template mw_app_pkg_info + + template (present) AppPkgInfo mw_app_pkg_info_onboarded( template (present) Json.String p_id := ?, template (present) Json.String p_appDId := ?, template (present) Json.String p_appName := ?, diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 1a945263c24025d9c1e64dfaf4bc1b5646d5b845..4c875731d7997d3fd6b361e1c23633f1b319cf61 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 / TTF T027 + * @author ETSI / TTF T012 / TTF T027 / TTF T043 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) @@ -1323,25 +1323,25 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String appProvider optional, Checksum checksum, KeyValuePairs userDefinedData optional, - Json.AnyURI appPkgPath + Json.AnyURI appPkgPath optional } /** * @desc The data type AppPkgInfo represents the parameters for an application package resource * @member id Identifier of the application package resource - * @member appDId The application descriptor identifier - * @member appProvider The provider's name of the onboarded application package - * @member appName Name of the onboarded application - * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package - * @member appDVersion Version of the application descriptor - * @member checksum Checksum of the onboarded application package - * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive - * @member softwareImages Information of application software image in application package - * @member additionalArtifacts Additional information of application package artifacts that are not application software images - * @member onboardingState Onboarding state of application package - * @member operationalState Operational state of the onboarded application package + * @member appDId The application descriptor identifier. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appProvider The provider's name of the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appName Name of the onboarded application. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appDVersion Version of the application descriptor. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member checksum Checksum of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. + * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive. This attribute shall not be present before the application package content is on-boarded. + * @member softwareImages Information of application software image in application package. This attribute shall not be present before the application package content is on-boarded. + * @member additionalArtifacts Additional information of application package artifacts that are not application software images. This attribute shall not be present before the application package content is on-boarded. + * @member onboardingState Onboarding state of application package. This attribute shall not be present before the application package content is on-boarded. + * @member operationalState Operational state of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. * @member usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application + * @member mecInfo The MEC version that compatible with this application. This attribute shall not be present before the application package content is on-boarded. * @member userDefinedData User defined data for the application package * @member onboardingFailureDetails Failure details of current onboarding procedure * @member links Links to resources related to this resource @@ -1349,22 +1349,22 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record AppPkgInfo { Json.String id, - Json.String appDId, + Json.String appDId optional, Json.String appProvider optional, - Json.String appName, - Json.String appSoftwareVersion, - Json.String appDVersion, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, Checksum checksum, Json.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, + AppPkgSWImageInfo softwareImages optional, AppPkgArtifactInfo additionalArtifacts optional, OnboardingState onboardingState, AppPkgInfo_OperationalState operationalState, UsageState usageState, - AppPkgInfo_MecInfo mecInfo, + AppPkgInfo_MecInfo mecInfo optional, KeyValuePairs userDefinedData optional, ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links + AppPkgInfo_Links links optional } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index 228478d8d257ee0f12a950abaaba4be078b675c1..72e35ca86fcbebf3000bfcf391e57ffadd175913 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) + * @desc Types ANd Values for ETSI GS MEC 016 V3.1.1 (2024-03) * @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. @@ -16,7 +16,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Information on available applications * @member appList List of user applications available to the device application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList { AppList appList optional @@ -26,7 +26,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Information on available applications * @member appInfo List of user applications available to the device application * @member vendorSpecificExt Extension for vendor specific information - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppListItem { ApplicationList_AppInfo appInfo, @@ -44,7 +44,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member appLocation Identifies the locations of the MEC application * @member appCharcs Characteristics of the application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { Json.String appDId, @@ -60,7 +60,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Extension for vendor specific information * @member vendorId Vendor identifier - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record VendorSpecificExt { Json.String vendorId @@ -73,7 +73,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance * @member serviceCont Required service continuity mode for this application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppCharcs { Json.UInteger memory optional, @@ -85,7 +85,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Required service continuity mode for this application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type enumerated ServiceCount { SERVICE_CONTINUITY_NOT_REQUIRED (0), @@ -102,7 +102,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request * @member appInfo - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record AppContext { Json.String contextId optional, @@ -123,7 +123,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member userAppInstanceInfo List of user application instance information * @member appPackageSource URI of the application package - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { Json.String appDId, @@ -141,7 +141,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application instance * @member appLocation Location of the user application instance - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record UserAppInstanceInfo { Json.String appInstanceId optional, @@ -154,7 +154,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Information on locations available instantiation of new user application instances * @member associateDevAppId Uniquely identifies the device application * @member appInfo - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability { Json.String associateDevAppId, @@ -171,7 +171,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member availableLocations MEC application location constraints * @member appPackageSource URI of the application package. Shall be included in the request - * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { Json.String appDId, @@ -187,7 +187,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record AvailableLocations { LocationConstraints appLocation optional @@ -200,7 +200,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member contextId Uniquely identifies the application context in the MEC system * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application. Used as the reference URI for the application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { Json.String notificationType, @@ -213,7 +213,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Notification from the UALCMP regarding the deletion of an application context by the MEC system * @member notificationType Shall be set to "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { Json.String notificationType, @@ -225,7 +225,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member notificationType Shall be set to "ApplicationContextUpdateNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member userAppInstanceInfo List of user application instance information - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { Json.String notificationType, @@ -238,7 +238,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member notificationType Shall be set to "ApplicationLocationAvailabilityNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member availableLocations Locations available to the MEC application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { Json.String notificationType, @@ -251,7 +251,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent * @member civicAddressElement Zero or more elements comprising the civic address * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record LocationConstraints { Json.String countryCode optional, @@ -264,7 +264,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Elements comprising the civic address * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record CivicAddressElement { Json.Integer caType, @@ -273,7 +273,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Polygon { Json.String type_, @@ -287,7 +287,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Geometry { Json.String type_, @@ -300,7 +300,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Property { Json.String key, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index c678558f380be9b27c0f26c9050a524438f96f1f..e126aac045c7bbf453b92ee475600ad0a445f9c1 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -106,6 +106,92 @@ module TrafficManagementAPI_Functions { } // End of 'alt' statement } // End of function f_delete_bw_allocation_resource + function f_create_bw_chg_event_subscription( + out BwChgEventSubscription p_bw_chg_event_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_BWM_SUB_URI & "/(?*)", + 0 + ); + p_bw_chg_event_subscription := v_response.response.body.json_body.m_bw_chg_event_subscription; + log("f_create_bw_chg_event_subscription: INFO: IUT successfully responds to the subscription: ", p_bw_chg_event_subscription); + log("f_create_bw_chg_event_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_bw_chg_event_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_bw_chg_event_subscription + + function f_delete_bw_chg_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_bw_chg_event_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_bw_chg_event_subscription + function f_create_mts_session_info_resource( in Json.String p_app_instance_id, out charstring p_mts_session_id, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index 7250495f4187d559de3f0b0f59eb0a9de4bec0a2..db215a190b380f28b43f96ee9ab52922d15b5a0f 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,6 +5,11 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support TrafficManagementAPI? + */ + modulepar boolean PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED := true; + /** * @desc Does the IUT support Multi-access Traffic Steering API? */ diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 02851fdecdb13a0274855ef4beccda0731e7b4df..3abc8a695b2efe8e6cf536cc9577871ecb8225bf 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -29,4 +29,14 @@ module TrafficManagementAPI_Pixits { modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; + modulepar Json.String PX_BW_Subcription_Type := "BwChgEventSubscription"; + + modulepar Json.String PX_BW_EVENT_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.AnyURI PX_BW_SUB_WEB_SOCKET := "ws://clientApp.example.com/location_notifications/123456"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "UnknownSubId"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_TYPE := "UnknownSubType"; + } // End of module TrafficManagementAPI_Pixits diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 7eb39f08ece78a067f43eb9ea40cd5ec6bd2cb42..4d0300e3b1a6344d946b82e6fc77311b2e1e21d9 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -119,6 +119,95 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template mw_session_filter + template (omit) BwChgEventSubscription m_bw_chg_event_subscription( + in template (omit) Json.String p_subscription_type := ?, + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in template (value) FlowFilter p_flowfilter := ? + ) := { + subscriptionType := p_subscription_type, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_flowfilter + } + + template (omit) FilterCriteria m_filter_criteria( + in AppInsId p_appInsId := PX_APP_INSTANCE_ID, + in template (omit) Json.String p_ueIp := omit + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_flowfilterW + + template (present) BwChgEventSubscription mw_bw_chg_event_subscription( + template (present) Json.String p_subscriptionType := ? + template (present) Json.AnyURI p_callbackReference := ?, + template WebsockNotifConfig p_websockNotifConfig := *, + template Links p_links := *, + template (present) FlowFilter p_flowfilter := ? + ) := { + subscriptionType := p_subscriptionType, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_flowfilter + } + + + template (present) SubscriptionLinkList mw_subscription_link_list( + template (present) Links p_links := ?, + template Subscriptions p_subscription := * + ) := { + links := p_links, + subscription := p_subscription + } // End of template mw_subscription_link_list + + template (present) Links mw_links( + template (value) LinkType p_self + ) :={ + self := p_self + } // End of template m_links + + template (present) Subscription mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + + + + template (present) FilterCriteria mw_filter_criteria( + template Json.String p_appInsId := *, + template Json.String p_ueIp := * + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_flowfilterW + + template (present) BwChgEventNotification mw_bw_chg_event_notificatipn( + template (present) Json.String p_notificationType := "BwChgEventNotification", + template TimeStamp p_timeStamp := ?, + template DataVolDispersion p_dataVolDispersion := *, + template Links p_links := ?, + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template mw_bw_chg_event_notificatipn + + template (present) DataVolDispersion mw_data_vol_dispersion( + template (value) uint32 p_dataVol, + template (value) Json.String p_appInsId, + template (present) Json.String p_ueIp := ? + ) := { + dataVol := p_dataVol, + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template mw_data_vol_dispersion + template (omit) MtsCapabilityInfo m_mts_capability_info( in template (value) MtsAccessInfos p_mtsAccessInfo, in template (value) MtsModes p_mtsMode, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index f9d5380dba43d2a0efa42f3e636d5bb7e2c6769b..0d3b625ff0d891b9a25f86a4b180c00f1912bbbc 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -16,7 +16,7 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record BwInfo { AllocationId allocationId optional, @@ -40,7 +40,7 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.3 Type: BwInfoDeltas + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.3 Type: BwInfoDeltas */ type record BwInfoDeltas { Json.String allocationId, @@ -54,19 +54,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Bandwidth allocation instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String AllocationId; /** * @desc Application instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String AppInsId; /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -77,7 +77,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type enumerated MtsRequestType { APPLICATION_SPECIFIC_MTS_SESSION (0), @@ -88,7 +88,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type set of SessionFilterItem SessionFilter; /** @@ -98,7 +98,7 @@ module TrafficManagementAPI_TypesAndValues { * @member dstAddress Destination address identity of session (including range) * @member dstPort Destination port identity of session * @member protocol Protocol number - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record SessionFilterItem { SourceIp sourceIp optional, @@ -110,7 +110,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated FixedBWPriority { reserved @@ -118,26 +118,26 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Size of requested fixed BW allocation in [bps] - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String FixedAllocation; /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger NanoSeconds; /** * @desc The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated AllocationDirection { Downlink, @@ -147,40 +147,157 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Source address identity of session (including range) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String SourceIp; /** * @desc Source port identity of session - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger SourcePort; /** * @desc Destination address identity of session (including range) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String DstAddress; /** * @desc Destination port identity of session - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger DstPort; /** * @desc Protocol number - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String Protocol; + /** + * @desc This type represents a subscription to the notifications from BWM service about the bandwidth utility or data volume dispersion information. + * @param subscriptionType Shall be set to "BwChgEventSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param FilterCriteria List of filtering criteria for the BW change event subscription. + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Definition of type BwChgEventSubscription + */ + type record BwChgEventSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.5.3 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + /** + * @desc Filtering criteria for the BW change event subscription + * @param appInsId Application instance identifier + * @param ueIp Source address identity of session + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record FilterCriteria_ { + Json.String appInsId optional, + Json.String ueIp optional + } + type set of FilterCriteria_ FilterCriteria + + /** + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @member subscription + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links optional, // URI of this resource + Subscription subscriptions optional // List of subscriptions + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc Type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.5.3 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Attributes of SubscriptionLinkList. + * @field href The URI referring to the subscription (mandatory). + * @field subscriptionType Type of the subscription. + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href // The URI referring to the subscription + Json.String subscriptionType // Type of the subscription + } + type set of Subscription Subscriptions + + /** + * @desc This type represents a notification for bandwidth change events. + * @member notificationType Shall be set to "BwChgEventNotification". + * @member timeStamp Date and time of the generation of the notification (optional). + * @member dataVolDispersion List of data volume dispersion information. + * @member links Object containing hyperlinks related to the resource (optional). + * @see Table 7.4.2: Attributes of the BwChgEventNotification + */ + type record BwChgEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + DataVolDispersion dataVolDispersion, + Links links optional + } with { + variant (links) "name as '_links'"; + }; + + /** + * @desc This type represents data volume dispersion information. + * @member dataVol Sum of data volume (UL/DL) exchanged per UE per application. + * @member appInsId Application instance identifier. + * @member ueIp Source address identity of session (optional). + */ + type record DataVolDispersion_ { + UInt32 dataVol, + Json.String appInsId, + Json.String ueIp optional + }; +type set of DataVolDispersion_ DataVolDispersion + + /** * @desc The information on access network connection * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member mtsAccessInfo The information on access network connection as defined below * @member mtsMode Numeric value corresponding to a specific MTS operation supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { TimeStamp timeStamp optional, @@ -190,7 +307,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc The information on access network connection as defined below - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated MtsMode { LowCost (0), @@ -208,7 +325,7 @@ module TrafficManagementAPI_TypesAndValues { * @member accessId Unique identifier for the access network connection * @member accessType Numeric value (0-255) corresponding to specific type of access network * @member metered Numeric value (0-255) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { AccessId accessId, @@ -219,13 +336,13 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Unique identifier for the access network connection - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type Json.UInteger AccessId; /** * @desc Numeric value (0-255) corresponding to specific type of access network - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated AccessType { Unknown (0), @@ -246,7 +363,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Numeric value (0-255) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated Metered { CxNotMetered (0), @@ -267,7 +384,7 @@ module TrafficManagementAPI_TypesAndValues { * @member qosD QoS requirement description of the MTS session * @member mtsMode Numeric value corresponding to a specific MTS operation * @member trafficDirection The direction of the requested MTS session supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { SessionId sessionId optional, @@ -284,7 +401,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc MTS session instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type Json.String SessionId; @@ -297,7 +414,7 @@ module TrafficManagementAPI_TypesAndValues { * @member protocol Protocol number * @member dscp DSCP in the IPv4 header or Traffic Class in the IPv6 header * @member flowlabel Flow Label in the IPv6 header, applicable only if the flow is IPv6 - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record FlowFilterItem { SourceIp sourceIp optional, @@ -312,19 +429,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc The direction of the requested MTS session supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type AllocationDirection TrafficDirection; /** * @desc DSCP in the IPv4 header or Traffic Class in the IPv6 header - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type Json.UInteger Dscp; /** * @desc Flow Label in the IPv6 header, applicable only if the flow is IPv6 - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type Json.UInteger Flowlabel; @@ -335,7 +452,7 @@ module TrafficManagementAPI_TypesAndValues { * @member maxLoss Tolerable packet loss rate in [1/10^x] * @member maxJitter Tolerable jitter in [10 nanoseconds] * @member priority numeric value (0 - 255) corresponding to the traffic priority - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { Json.UInteger minTpt optional, diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index e7fe2cd791c48b530919269fddac12086de35ecd..d3589d90736eb95c6985439b5950f89e7e5ea8a0 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ - * @desc Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06) + * @desc Module containing types and values for ETSI GS MEC 014 V3.2.1 (2024-02) * @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. @@ -16,7 +16,7 @@ module UEidentityAPI_TypesAndValues { /** * @desc Information of UE identity tag used in UE Identity feature * @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -24,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2023-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -42,7 +42,7 @@ module UEidentityAPI_TypesAndValues { * @desc ME Application instance to a ME Platform * @member ueIdentityTag Specific tag presented by a ME Application instance to a ME Platform * @member state Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { Json.String ueIdentityTag, @@ -51,7 +51,7 @@ module UEidentityAPI_TypesAndValues { /** * @desc 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type set of UeIdentityTagItem UeIdentityTags; diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index fee2d654347d9ae207f7681d1c2cdd6f0f0ca542..22d08f63ff2df6be33eddf9bac5efeedc8cb70f6 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -23,6 +23,8 @@ module LibMec_Pixits { modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; + + modulepar charstring PX_ME_BWM_SUB_URI := "bwm/v1/subscriptions"; modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 332f676e4442dc12f2eadcdc46a7d506195a6c24..513c1e37541c7abb345b3f399f59aa58339174ff 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -77,6 +77,9 @@ module LibHttp_JsonMessageBodyTypes { BwInfoList bwInfoList, BwInfo bwInfo, BwInfoDeltas bwInfoDeltas, + BwChgEventSubscription bwchgeventsubscription, + TrafficManagementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_bw + BwChgEventNotification bwChgEventNotification MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index fabd6e5abd4f6898597b6997fd5329ac1eaa0210..8df7bb8422bf19f2497f8629d7feac810971d532 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -916,6 +916,36 @@ module LibHttp_JsonTemplates { bwInfoList := p_bwInfoList } // End of template mw_body_json_bw_info_list + template (value) JsonBody m_body_json_bw_chg_event_subscription( + in template (value) BwChgEventSubscription p_bwchgeventsubscription + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_chg_event_subscription( + template (present) BwChgEventSubscription p_bwchgeventsubscription := ? + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_chg_event_subscription( + template (present) TrafficManagementAPI_TypesAndValues.SubscriptionLinkList p_subscriptionlinklist := ? + ) := { + subscriptionLinkList := p_subscriptionlinklist + } // End + + template (value) JsonBody m_body_json__bw_chg_event_notification( + in template (value) BwChgEventNotification p_bwchgeventnotification + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template m_body_json__bw_chg_event_notification + + template (present) JsonBody mw_body_json__bw_chg_event_notification( + template (present) BwChgEventNotification p_bwchgeventnotification := ? + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template mw_body_json__bw_chg_event_notification + template (value) JsonBody m_body_json_mts_capability_info( in template (value) MtsCapabilityInfo p_mtsCapabilityInfo ) := {