Loading LICENSE 0 → 100644 +25 −0 Original line number Original line Diff line number Diff line ETSI Software License As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, free of charge, to use, reproduce and modify this software source code, under the following conditions: - This source code is provided “AS IS” with no warranties, express or implied, including but not limited to, the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement of intellectual property rights. ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use of or inability to use the source code. - This permission is granted to facilitate the implementation of the related ETSI standard, provided that ETSI is given the right to use, reproduce and amend the modified source code under the same conditions as the present permission. - This permission does not apply to any documentation associated with this source code for which ETSI keeps all rights reserved. The present ETSI Source Code license shall be included in all copies of whole or part of this source code and shall not imply any sub-license right. TODO.md +32 −4 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,14 @@ This file provides the list of the TODOs related to the STF 569. ### RNIS ### RNIS Draft ETSI GS MEC 012 2.0.4 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 - TC_MEC_SRV_RNIS_011_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_RNIS_012_OK <font color="color:green">To be tested</font> ### SAQ ### SAQ ### SRVSUB ### SRVSUB Loading @@ -29,19 +37,40 @@ This file provides the list of the TODOs related to the STF 569. ### TRAF ### TRAF Draft ETSI GS MEC 011 V2.0.9 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 - TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_002_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_003_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_001_NF <font color="color:green">To be tested</font> ### TRANS ### TRANS Draft ETSI GS MEC 011 V2.0.9 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2 - TP_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font> ### UEAREASUB ### UEAREASUB Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeAreaSubscription.tplan2 TODO CircleNotificationSubscription data structure not found ### UEDISTLOOK ### UEDISTLOOK Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeDistanceSubscription.tplan2 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTLOOK/PlatUeDistanceSubscription.tplan2 TODO TerminalDistance data structure not found TODO TerminalDistance data structure not found ### UEDISTSUB ### UEDISTSUB Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) Loading @@ -50,7 +79,6 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20 TODO DistanceNotificationSubscription data structure not found TODO DistanceNotificationSubscription data structure not found ### UEINFLOOK ### UEINFLOOK Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) Loading ccsrc/Protocols/Json/json_codec.cc +43 −9 Original line number Original line Diff line number Diff line Loading @@ -24,6 +24,10 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else { } else { loggers::get_instance().error("json_codec::encode: Not supported"); loggers::get_instance().error("json_codec::encode: Not supported"); } } Loading Loading @@ -58,21 +62,26 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy // ..and create the decoding buffer // ..and create the decoding buffer TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); if (it->second.find("\"userList\"") != std::string::npos) { // Be carefull to the order if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"userList\"") is not optimal // TODO To be refined, find("\"userList\"") is not optimal LocationAPI__TypesAndValues::UserList user_list; LocationAPI__TypesAndValues::UserList user_list; user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userList() = user_list; msg.userList() = user_list; } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be carefull to the order } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal LocationAPI__TypesAndValues::AccessPointList access_point_list; LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; msg.accessPointList() = access_point_list; } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be carefull to the order } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_list; msg.subscriptionLinkList() = subscription_link_list; } else if (it->second.find("\"transportInfoList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal AppEnablementAPI__TypesAndValues::TransportInfoList transport_info_list; transport_info_list.decode(AppEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.transportInfoList() = transport_info_list; } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); Loading @@ -85,6 +94,23 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.ueIdentityTagInfo() = ue_identity_tag_info; msg.ueIdentityTagInfo() = ue_identity_tag_info; } else if (it->second.find("\"trafficRule\"") != std::string::npos) { AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule; traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.trafficRule() = traffic_rule; } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) { RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.cellChangeSubscription() = cell_change_subscription; //TODO Continue with other ChangeSubscription } else if (it->second.find("\"RabInfo\"") != std::string::npos) { RnisAPI__TypesAndValues::RabInfo rab_info; rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabInfo() = rab_info; } else if (it->second.find("\"PlmnInfo\"") != std::string::npos) { RnisAPI__TypesAndValues::PlmnInfo plmn_info; plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.plmnInfo() = plmn_info; } else if (it->second.find("\"bwInfo\"") != std::string::npos) { } else if (it->second.find("\"bwInfo\"") != std::string::npos) { BwManagementAPI__TypesAndValues::BwInfo bw_info; BwManagementAPI__TypesAndValues::BwInfo bw_info; Loading @@ -105,9 +131,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; msg.bwInfo() = bw_info; } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules UEidentityAPI__TypesAndValues::ProblemDetails problem_details; problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails__ue__identity() = problem_details; // UEidentityAPI__TypesAndValues::ProblemDetails problem_details; // problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); // msg.problemDetails__ue__identity() = problem_details; RnisAPI__TypesAndValues::ProblemDetails problem_details; problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails__rni() = problem_details; } else { } else { loggers::get_instance().warning("json_codec::decode: Unsupported variant"); loggers::get_instance().warning("json_codec::decode: Unsupported variant"); return -1; return -1; Loading docker/Dockerfile +3 −4 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ libssl-dev \ libssl-dev \ libtool-bin \ libtool-bin \ libtool \ libtool \ libwebsockets-dev \ libwireshark-dev \ libwireshark-dev \ libxml2-dev \ libxml2-dev \ lsof \ lsof \ Loading Loading @@ -87,9 +88,9 @@ RUN cd /home/etsi \ # Seems that COPY does not work as expected, to be investaged # Seems that COPY does not work as expected, to be investaged #==> Fallback to more secured solution #==> Fallback to more secured solution #COPY [^.]* /home/etsi/dev/STF569_Mec/ ADD . /home/etsi/dev/STF569_Mec #COPY home home/etsi #COPY home home/etsi RUN git clone https://forge.etsi.org/gitlab/mec/gs032p3-ttcn-test-suite.git /home/etsi/dev/STF569_Mec # RUN git clone https://forge.etsi.org/gitlab/mec/gs032p3-ttcn-test-suite.git /home/etsi/dev/STF569_Mec RUN chown -R etsi /home/etsi/dev/STF569_Mec/ && cd /home/etsi/dev/STF569_Mec RUN chown -R etsi /home/etsi/dev/STF569_Mec/ && cd /home/etsi/dev/STF569_Mec USER etsi USER etsi Loading @@ -107,8 +108,6 @@ RUN cd /home/etsi/frameworks \ && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \ && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \ && cd /home/etsi/dev/STF569_Mec \ && cd /home/etsi/dev/STF569_Mec \ && cd /home/etsi/dev/STF569_Mec/ttcn \ && cd /home/etsi/dev/STF569_Mec/ttcn \ && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \ && git clone https://forge.etsi.org/gitlab/LIBS/LibIms.git ./LibIms \ && git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon \ && git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon \ && git clone -bSTF525 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts \ && git clone -bSTF525 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts \ && cd /home/etsi/dev/STF569_Mec/ttcn/LibIts \ && cd /home/etsi/dev/STF569_Mec/ttcn/LibIts \ Loading docker/build-container.sh +9 −4 Original line number Original line Diff line number Diff line Loading @@ -3,20 +3,25 @@ # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt #set -e #set -e #set -vx set -vx DOCKER_FILE=./docker/Dockerfile DOCKER_FILE=./docker/Dockerfile if [ -f ${DOCKER_FILE} ] if [ -f ${DOCKER_FILE} ] then then docker rm --force stf569_Mec #check and build stf569_mec image docker build --tag stf569_Mec --force-rm -f ${DOCKER_FILE} . DOCKER_ID=`docker ps -a | grep -e stf569_mec | awk '{ print $1 }'` if [ ! -z "${DOCKER_ID}" ] then docker rm --force stf569_mec fi docker build --tag stf569_mec --force-rm -f ${DOCKER_FILE} . if [ "$?" != "0" ] if [ "$?" != "0" ] then then echo "Docker build failed: $?" echo "Docker build failed: $?" exit -1 exit -1 fi fi docker image ls -a docker image ls -a docker inspect stf569_Mec:latest docker inspect stf569_mec:latest if [ "$?" != "0" ] if [ "$?" != "0" ] then then echo "Docker inspect failed: $?" echo "Docker inspect failed: $?" Loading Loading
LICENSE 0 → 100644 +25 −0 Original line number Original line Diff line number Diff line ETSI Software License As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, free of charge, to use, reproduce and modify this software source code, under the following conditions: - This source code is provided “AS IS” with no warranties, express or implied, including but not limited to, the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement of intellectual property rights. ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use of or inability to use the source code. - This permission is granted to facilitate the implementation of the related ETSI standard, provided that ETSI is given the right to use, reproduce and amend the modified source code under the same conditions as the present permission. - This permission does not apply to any documentation associated with this source code for which ETSI keeps all rights reserved. The present ETSI Source Code license shall be included in all copies of whole or part of this source code and shall not imply any sub-license right.
TODO.md +32 −4 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,14 @@ This file provides the list of the TODOs related to the STF 569. ### RNIS ### RNIS Draft ETSI GS MEC 012 2.0.4 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 - TC_MEC_SRV_RNIS_011_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_RNIS_012_OK <font color="color:green">To be tested</font> ### SAQ ### SAQ ### SRVSUB ### SRVSUB Loading @@ -29,19 +37,40 @@ This file provides the list of the TODOs related to the STF 569. ### TRAF ### TRAF Draft ETSI GS MEC 011 V2.0.9 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 - TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_002_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_003_OK <font color="color:green">To be tested</font> - TC_MEC_SRV_TRAF_001_NF <font color="color:green">To be tested</font> ### TRANS ### TRANS Draft ETSI GS MEC 011 V2.0.9 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2 - TP_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font> ### UEAREASUB ### UEAREASUB Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeAreaSubscription.tplan2 TODO CircleNotificationSubscription data structure not found ### UEDISTLOOK ### UEDISTLOOK Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeDistanceSubscription.tplan2 https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTLOOK/PlatUeDistanceSubscription.tplan2 TODO TerminalDistance data structure not found TODO TerminalDistance data structure not found ### UEDISTSUB ### UEDISTSUB Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) Loading @@ -50,7 +79,6 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20 TODO DistanceNotificationSubscription data structure not found TODO DistanceNotificationSubscription data structure not found ### UEINFLOOK ### UEINFLOOK Draft ETSI GS MEC 013 V2.0.3 (2018-10) Draft ETSI GS MEC 013 V2.0.3 (2018-10) Loading
ccsrc/Protocols/Json/json_codec.cc +43 −9 Original line number Original line Diff line number Diff line Loading @@ -24,6 +24,10 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else { } else { loggers::get_instance().error("json_codec::encode: Not supported"); loggers::get_instance().error("json_codec::encode: Not supported"); } } Loading Loading @@ -58,21 +62,26 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy // ..and create the decoding buffer // ..and create the decoding buffer TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); if (it->second.find("\"userList\"") != std::string::npos) { // Be carefull to the order if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"userList\"") is not optimal // TODO To be refined, find("\"userList\"") is not optimal LocationAPI__TypesAndValues::UserList user_list; LocationAPI__TypesAndValues::UserList user_list; user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userList() = user_list; msg.userList() = user_list; } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be carefull to the order } else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal LocationAPI__TypesAndValues::AccessPointList access_point_list; LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; msg.accessPointList() = access_point_list; } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be carefull to the order } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_list; msg.subscriptionLinkList() = subscription_link_list; } else if (it->second.find("\"transportInfoList\"") != std::string::npos) { // Be careful to the order // TODO To be refined, find("\"accessPointList\"") is not optimal AppEnablementAPI__TypesAndValues::TransportInfoList transport_info_list; transport_info_list.decode(AppEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.transportInfoList() = transport_info_list; } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); Loading @@ -85,6 +94,23 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.ueIdentityTagInfo() = ue_identity_tag_info; msg.ueIdentityTagInfo() = ue_identity_tag_info; } else if (it->second.find("\"trafficRule\"") != std::string::npos) { AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule; traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.trafficRule() = traffic_rule; } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) { RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.cellChangeSubscription() = cell_change_subscription; //TODO Continue with other ChangeSubscription } else if (it->second.find("\"RabInfo\"") != std::string::npos) { RnisAPI__TypesAndValues::RabInfo rab_info; rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabInfo() = rab_info; } else if (it->second.find("\"PlmnInfo\"") != std::string::npos) { RnisAPI__TypesAndValues::PlmnInfo plmn_info; plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.plmnInfo() = plmn_info; } else if (it->second.find("\"bwInfo\"") != std::string::npos) { } else if (it->second.find("\"bwInfo\"") != std::string::npos) { BwManagementAPI__TypesAndValues::BwInfo bw_info; BwManagementAPI__TypesAndValues::BwInfo bw_info; Loading @@ -105,9 +131,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; msg.bwInfo() = bw_info; } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules UEidentityAPI__TypesAndValues::ProblemDetails problem_details; problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails__ue__identity() = problem_details; // UEidentityAPI__TypesAndValues::ProblemDetails problem_details; // problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); // msg.problemDetails__ue__identity() = problem_details; RnisAPI__TypesAndValues::ProblemDetails problem_details; problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails__rni() = problem_details; } else { } else { loggers::get_instance().warning("json_codec::decode: Unsupported variant"); loggers::get_instance().warning("json_codec::decode: Unsupported variant"); return -1; return -1; Loading
docker/Dockerfile +3 −4 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ libssl-dev \ libssl-dev \ libtool-bin \ libtool-bin \ libtool \ libtool \ libwebsockets-dev \ libwireshark-dev \ libwireshark-dev \ libxml2-dev \ libxml2-dev \ lsof \ lsof \ Loading Loading @@ -87,9 +88,9 @@ RUN cd /home/etsi \ # Seems that COPY does not work as expected, to be investaged # Seems that COPY does not work as expected, to be investaged #==> Fallback to more secured solution #==> Fallback to more secured solution #COPY [^.]* /home/etsi/dev/STF569_Mec/ ADD . /home/etsi/dev/STF569_Mec #COPY home home/etsi #COPY home home/etsi RUN git clone https://forge.etsi.org/gitlab/mec/gs032p3-ttcn-test-suite.git /home/etsi/dev/STF569_Mec # RUN git clone https://forge.etsi.org/gitlab/mec/gs032p3-ttcn-test-suite.git /home/etsi/dev/STF569_Mec RUN chown -R etsi /home/etsi/dev/STF569_Mec/ && cd /home/etsi/dev/STF569_Mec RUN chown -R etsi /home/etsi/dev/STF569_Mec/ && cd /home/etsi/dev/STF569_Mec USER etsi USER etsi Loading @@ -107,8 +108,6 @@ RUN cd /home/etsi/frameworks \ && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \ && rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \ && cd /home/etsi/dev/STF569_Mec \ && cd /home/etsi/dev/STF569_Mec \ && cd /home/etsi/dev/STF569_Mec/ttcn \ && cd /home/etsi/dev/STF569_Mec/ttcn \ && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \ && git clone https://forge.etsi.org/gitlab/LIBS/LibIms.git ./LibIms \ && git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon \ && git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon \ && git clone -bSTF525 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts \ && git clone -bSTF525 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts \ && cd /home/etsi/dev/STF569_Mec/ttcn/LibIts \ && cd /home/etsi/dev/STF569_Mec/ttcn/LibIts \ Loading
docker/build-container.sh +9 −4 Original line number Original line Diff line number Diff line Loading @@ -3,20 +3,25 @@ # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt #set -e #set -e #set -vx set -vx DOCKER_FILE=./docker/Dockerfile DOCKER_FILE=./docker/Dockerfile if [ -f ${DOCKER_FILE} ] if [ -f ${DOCKER_FILE} ] then then docker rm --force stf569_Mec #check and build stf569_mec image docker build --tag stf569_Mec --force-rm -f ${DOCKER_FILE} . DOCKER_ID=`docker ps -a | grep -e stf569_mec | awk '{ print $1 }'` if [ ! -z "${DOCKER_ID}" ] then docker rm --force stf569_mec fi docker build --tag stf569_mec --force-rm -f ${DOCKER_FILE} . if [ "$?" != "0" ] if [ "$?" != "0" ] then then echo "Docker build failed: $?" echo "Docker build failed: $?" exit -1 exit -1 fi fi docker image ls -a docker image ls -a docker inspect stf569_Mec:latest docker inspect stf569_mec:latest if [ "$?" != "0" ] if [ "$?" != "0" ] then then echo "Docker inspect failed: $?" echo "Docker inspect failed: $?" Loading