Loading ccsrc/Protocols/Json/json_codec_mec011.cc +12 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,10 @@ int json_codec_mec011::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_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_service__api__description)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription& service_api_description = msg.service__api__description(); service_api_description.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } Loading Loading @@ -185,6 +189,14 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo__regapps() = appInfo; } else if (it->second.find("\"serviceAPIDescriptions\"") != std::string::npos) { EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs discovered_apis; discovered_apis.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.discovered__apis() = discovered_apis; } else if (it->second.find("\"apiName\"") != std::string::npos) { EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription service_api_description; service_api_description.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.service__api__description() = service_api_description; } else { return json_codec::decode(p_data, msg, p_params); } Loading ccsrc/Protocols/Json/json_codec_mec021.cc +19 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ int json_codec_mec021::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo& registration_info = msg.registrationInfo(); registration_info.encode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_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_mobilityProcedureSubscription)) { const ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription& mobility_procedure_subscription = msg.mobilityProcedureSubscription(); mobility_procedure_subscription.encode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } Loading Loading @@ -73,6 +77,21 @@ int json_codec_mec021::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo registration_info.decode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.registrationInfo() = registration_info; } } else if ((it->second.find("\"subscription\"") != std::string::npos) && (it->second.find("\"_links\"") != std::string::npos)) { // SubscriptionLinkList ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); subscription_link_list.decode(ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList__ams() = subscription_link_list; } else if (it->second.find("\"MobilityProcedureSubscription\"") != std::string::npos) { ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription mobility_procedure_subscription; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); mobility_procedure_subscription.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.mobilityProcedureSubscription() = mobility_procedure_subscription; } else if (it->second.find("\"MobilityProcedureNotification\"") != std::string::npos) { ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification mobility_procedure_notification; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); mobility_procedure_notification.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.mobilityProcedureNotification() = mobility_procedure_notification; } else { return json_codec::decode(p_data, msg, p_params); } Loading etc/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyService_Sandbox.cfg_ +9 −7 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ LibCommon_Time.PX_TAC := 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.21" LibHttp_Pics.PICS_HEADER_HOST := "yanngarcia.ddns.net" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true Loading @@ -19,11 +19,13 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in o LibMec_Pics.PICS_MEC_PLAT := true # LibMec/ApplicationMobilityServiceAPI # Application Instance ID ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID := "b96f8a13-4253-4a8c-9485-33e5391f950d" ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID_2 := "83a79787-2ceb-4b9b-ab0d-174463cb1896" # Application Instance ID. Get them from the MEC Sandbox GUI. ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID := "6534adc3-9732-4c4a-8d6f-18b105a3890c" ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID_2 := "d3ba5131-deb9-43e1-99ab-02c16d7e8c0b" ApplicationMobilityServiceAPI_Pixits.PX_MEP_ID := "MEP1" # Callbacks ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_REFERENCE := "https://yanngarcia.ddns.net:36001/ams/v1" ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_URI := "http://yanngarcia.ddns.net:36001/ams/v1" [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading Loading @@ -70,7 +72,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec021)/TCP(debug=1 #AtsMec_ApplicationMobiltyServiceAPI_TestControl.control # Check that the AMS service returns information about the registered application mobility services when requested AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 # Check that the AMS service returns information about the a specific registered application mobility service when requested - filter #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_02 # Check that the AMS service returns information about the a specific registered application mobility service when requested - filter Loading @@ -88,7 +90,7 @@ AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 # Check that the AMS service returns information about the available subscriptions when requested #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_OK # Check that the AMS service sends an error when it receives a malformed query about the available subscriptions #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_BR AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_BR # Check that the AMS service creates a notification subscriptions when requested #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_004_OK # Check that the AMS service sends an error when it receives a malformed request to create a notification subscription Loading etc/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterface.cfgdeleted 100644 → 0 +0 −115 Original line number Diff line number Diff line [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.40.50" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" #LibMec_Pics.PICS_ROOT_API := "/sbxnfzm34p/mep1/" # LibMec_Pixits DeviceApplicationInterfaceAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" # DeviceApplicationInterfaceAPI_Pixits.PX_APPD_ID := "onboarded-demo4" # DeviceApplicationInterfaceAPI_Pixits.PX_APP_DESCRIPTION := "Basic HTTP" # DeviceApplicationInterfaceAPI_Pixits.PX_APP_PROVIDER := "demo" # DeviceApplicationInterfaceAPI_Pixits.PX_ASSOCIATE_DEV_APPID := "bcee2135-2750-4d23-b786-a3062a371c8a" [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_DeviceApplicationInterface/%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_mec016)/TCP(debug=1,server=192.168.40.50,port=80,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_mec015)/TCP(debug=1,server_mode=1,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 user applications when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_NF # Check that the IUT responds with the list of user applications when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_BR #Check that the IUT acknowledges the creation of the application context when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_OK # Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_BR # Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_NF # Check that the IUT acknowledges the creation of the application context when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_NF # Check that the IUT deletes the application context when commanded by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_NF # Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_NF [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 etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ +32 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,10 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign i LibMec_Pics.PICS_MEC_PLAT := true # Application Instance ID EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "f1e4d448-e277-496b-bf63-98391cfd20fb" # Copied from ETSI MEC Sandbox GUI EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "52bd535e-7a3e-4fef-8678-b2c832c9be95" # Copied from ETSI MEC Sandbox GUI # MEC APIs EdgePlatformApplicationEnablementAPI_Pixits.PX_API_NAME := "mec015-1" # Pickup from MEC Sandbox logs console EdgePlatformApplicationEnablementAPI_Pixits.PX_API_ID := "a6612a80-85f2-41e0-8565-4bf477483fb7" # Callbacks Loading Loading @@ -72,7 +75,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1 # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_BR # Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_NF #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_NF # Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application Loading Loading @@ -193,6 +196,33 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 # Check that the IUT responds with current time when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK # Check that the IUT responds with all service APIs when queried by a MEC Application - No filter #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_01 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiName AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_02 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_03 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId and apiName #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05 # Check that the IUT responds with an error when applying a malformed filter #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_BR # Check that the IUT responds with an error when applying a filter on an unknown apiName #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_NF # Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_OK # Check that the IUT responds with an error when applying a filter on an unknown apfId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_NF # Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK # Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - supportedFeatures shall be present #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR # Check that the IUT responds with a serviceAPIDescription when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK # Check that the IUT responds with an error when applying a filter on an unknown apfId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01 # Check that the IUT responds with an error when applying a filter on an unknown serviceApiId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02 [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. Loading Loading
ccsrc/Protocols/Json/json_codec_mec011.cc +12 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,10 @@ int json_codec_mec011::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_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_service__api__description)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription& service_api_description = msg.service__api__description(); service_api_description.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } Loading Loading @@ -185,6 +189,14 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo__regapps() = appInfo; } else if (it->second.find("\"serviceAPIDescriptions\"") != std::string::npos) { EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs discovered_apis; discovered_apis.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.discovered__apis() = discovered_apis; } else if (it->second.find("\"apiName\"") != std::string::npos) { EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription service_api_description; service_api_description.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.service__api__description() = service_api_description; } else { return json_codec::decode(p_data, msg, p_params); } Loading
ccsrc/Protocols/Json/json_codec_mec021.cc +19 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ int json_codec_mec021::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo& registration_info = msg.registrationInfo(); registration_info.encode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_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_mobilityProcedureSubscription)) { const ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription& mobility_procedure_subscription = msg.mobilityProcedureSubscription(); mobility_procedure_subscription.encode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } Loading Loading @@ -73,6 +77,21 @@ int json_codec_mec021::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo registration_info.decode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.registrationInfo() = registration_info; } } else if ((it->second.find("\"subscription\"") != std::string::npos) && (it->second.find("\"_links\"") != std::string::npos)) { // SubscriptionLinkList ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); subscription_link_list.decode(ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList__ams() = subscription_link_list; } else if (it->second.find("\"MobilityProcedureSubscription\"") != std::string::npos) { ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription mobility_procedure_subscription; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); mobility_procedure_subscription.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.mobilityProcedureSubscription() = mobility_procedure_subscription; } else if (it->second.find("\"MobilityProcedureNotification\"") != std::string::npos) { ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification mobility_procedure_notification; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); mobility_procedure_notification.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.mobilityProcedureNotification() = mobility_procedure_notification; } else { return json_codec::decode(p_data, msg, p_params); } Loading
etc/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyService_Sandbox.cfg_ +9 −7 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ LibCommon_Time.PX_TAC := 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.21" LibHttp_Pics.PICS_HEADER_HOST := "yanngarcia.ddns.net" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true Loading @@ -19,11 +19,13 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in o LibMec_Pics.PICS_MEC_PLAT := true # LibMec/ApplicationMobilityServiceAPI # Application Instance ID ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID := "b96f8a13-4253-4a8c-9485-33e5391f950d" ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID_2 := "83a79787-2ceb-4b9b-ab0d-174463cb1896" # Application Instance ID. Get them from the MEC Sandbox GUI. ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID := "6534adc3-9732-4c4a-8d6f-18b105a3890c" ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID_2 := "d3ba5131-deb9-43e1-99ab-02c16d7e8c0b" ApplicationMobilityServiceAPI_Pixits.PX_MEP_ID := "MEP1" # Callbacks ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_REFERENCE := "https://yanngarcia.ddns.net:36001/ams/v1" ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_URI := "http://yanngarcia.ddns.net:36001/ams/v1" [LOGGING] # In this section you can specify the name of the log file and the classes of events Loading Loading @@ -70,7 +72,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec021)/TCP(debug=1 #AtsMec_ApplicationMobiltyServiceAPI_TestControl.control # Check that the AMS service returns information about the registered application mobility services when requested AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 # Check that the AMS service returns information about the a specific registered application mobility service when requested - filter #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_02 # Check that the AMS service returns information about the a specific registered application mobility service when requested - filter Loading @@ -88,7 +90,7 @@ AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 # Check that the AMS service returns information about the available subscriptions when requested #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_OK # Check that the AMS service sends an error when it receives a malformed query about the available subscriptions #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_BR AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_BR # Check that the AMS service creates a notification subscriptions when requested #AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_004_OK # Check that the AMS service sends an error when it receives a malformed request to create a notification subscription Loading
etc/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterface.cfgdeleted 100644 → 0 +0 −115 Original line number Diff line number Diff line [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.40.50" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" #LibMec_Pics.PICS_ROOT_API := "/sbxnfzm34p/mep1/" # LibMec_Pixits DeviceApplicationInterfaceAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" # DeviceApplicationInterfaceAPI_Pixits.PX_APPD_ID := "onboarded-demo4" # DeviceApplicationInterfaceAPI_Pixits.PX_APP_DESCRIPTION := "Basic HTTP" # DeviceApplicationInterfaceAPI_Pixits.PX_APP_PROVIDER := "demo" # DeviceApplicationInterfaceAPI_Pixits.PX_ASSOCIATE_DEV_APPID := "bcee2135-2750-4d23-b786-a3062a371c8a" [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_DeviceApplicationInterface/%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_mec016)/TCP(debug=1,server=192.168.40.50,port=80,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_mec015)/TCP(debug=1,server_mode=1,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 user applications when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_NF # Check that the IUT responds with the list of user applications when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_BR #Check that the IUT acknowledges the creation of the application context when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_OK # Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_BR # Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_NF # Check that the IUT acknowledges the creation of the application context when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_NF # Check that the IUT deletes the application context when commanded by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_OK # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_NF # Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_NF [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
etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ +32 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,10 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign i LibMec_Pics.PICS_MEC_PLAT := true # Application Instance ID EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "f1e4d448-e277-496b-bf63-98391cfd20fb" # Copied from ETSI MEC Sandbox GUI EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "52bd535e-7a3e-4fef-8678-b2c832c9be95" # Copied from ETSI MEC Sandbox GUI # MEC APIs EdgePlatformApplicationEnablementAPI_Pixits.PX_API_NAME := "mec015-1" # Pickup from MEC Sandbox logs console EdgePlatformApplicationEnablementAPI_Pixits.PX_API_ID := "a6612a80-85f2-41e0-8565-4bf477483fb7" # Callbacks Loading Loading @@ -72,7 +75,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1 # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_BR # Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_NF #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_NF # Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application Loading Loading @@ -193,6 +196,33 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 # Check that the IUT responds with current time when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK # Check that the IUT responds with all service APIs when queried by a MEC Application - No filter #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_01 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiName AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_02 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_03 # Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId and apiName #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05 # Check that the IUT responds with an error when applying a malformed filter #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_BR # Check that the IUT responds with an error when applying a filter on an unknown apiName #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_NF # Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_OK # Check that the IUT responds with an error when applying a filter on an unknown apfId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_NF # Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK # Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - supportedFeatures shall be present #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR # Check that the IUT responds with a serviceAPIDescription when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK # Check that the IUT responds with an error when applying a filter on an unknown apfId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01 # Check that the IUT responds with an error when applying a filter on an unknown serviceApiId #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02 [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. Loading